*/
@Test
public void testNonmatchingVariantCannotBeServedFromCacheUnlessConditionallyValidated()
throws Exception {
final HttpRequestWrapper req1 = HttpRequestWrapper.wrap(
new BasicHttpRequest("GET", "/", HttpVersion.HTTP_1_1));
req1.setHeader("User-Agent","MyBrowser/1.0");
final HttpResponse resp1 = HttpTestUtils.make200Response();
resp1.setHeader("ETag","\"etag1\"");
resp1.setHeader("Cache-Control","max-age=3600");
resp1.setHeader("Vary","User-Agent");
resp1.setHeader("Content-Type","application/octet-stream");
backendExpectsAnyRequestAndReturn(resp1);
final HttpRequestWrapper req2 = HttpRequestWrapper.wrap(
new BasicHttpRequest("GET", "/", HttpVersion.HTTP_1_1));
req2.setHeader("User-Agent","MyBrowser/1.5");
final HttpRequestWrapper conditional = HttpRequestWrapper.wrap(
new BasicHttpRequest("GET", "/", HttpVersion.HTTP_1_1));
conditional.setHeader("User-Agent","MyBrowser/1.5");
conditional.setHeader("If-None-Match","\"etag1\"");
final HttpResponse resp200 = HttpTestUtils.make200Response();
resp200.setHeader("ETag","\"etag1\"");
resp200.setHeader("Vary","User-Agent");