@Test
public void testSetsViaHeaderOnResponseForCacheMiss()
throws Exception {
impl = new CachingHttpClient(mockBackend);
HttpRequest req1 = new HttpGet("http://foo.example.com/");
HttpResponse resp1 = new BasicHttpResponse(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, "OK");
resp1.setEntity(HttpTestUtils.makeBody(128));
resp1.setHeader("Content-Length","128");
resp1.setHeader("ETag","\"etag\"");
resp1.setHeader("Date", DateUtils.formatDate(new Date()));
resp1.setHeader("Cache-Control","public, max-age=3600");
expect(mockBackend.execute(isA(HttpHost.class),
isA(HttpRequest.class), isA(HttpContext.class)))
.andReturn(resp1);