impl = new CachingHttpClient(mockBackend);
HttpRequest req1 = new HttpGet("http://foo.example.com/");
HttpRequest req2 = 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(tenSecondsAgo));
resp1.setHeader("Cache-Control","public, max-age=5");
HttpResponse resp2 = new BasicHttpResponse(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, "OK");
resp2.setEntity(HttpTestUtils.makeBody(128));
resp2.setHeader("Content-Length","128");
resp2.setHeader("ETag","\"etag\"");
resp2.setHeader("Date", DateUtils.formatDate(tenSecondsAgo));
resp2.setHeader("Cache-Control","public, max-age=5");
expect(mockBackend.execute(isA(HttpHost.class),
isA(HttpRequest.class), isA(HttpContext.class)))
.andReturn(resp1);
expect(mockBackend.execute(isA(HttpHost.class),