}
@Test
public void test206ResponseIncludesVariantHeadersIfValueMightDiffer() throws Exception {
final HttpRequestWrapper req1 = HttpRequestWrapper.wrap(
new BasicHttpRequest("GET", "/", HttpVersion.HTTP_1_1));
req1.addHeader("Accept-Encoding", "gzip");
final Date now = new Date();
final Date inOneHour = new Date(now.getTime() + 3600 * 1000L);
originResponse.addHeader("Cache-Control", "max-age=3600");
originResponse.addHeader("Expires", DateUtils.formatDate(inOneHour));
originResponse.addHeader("Vary", "Accept-Encoding");
final HttpRequestWrapper req2 = HttpRequestWrapper.wrap(
new BasicHttpRequest("GET", "/", HttpVersion.HTTP_1_1));
req2.addHeader("Cache-Control", "no-cache");
req2.addHeader("Accept-Encoding", "gzip");
final Date nextSecond = new Date(now.getTime() + 1000L);
final Date inTwoHoursPlusASec = new Date(now.getTime() + 2 * 3600 * 1000L + 1000L);
final HttpResponse originResponse2 = HttpTestUtils.make200Response();
originResponse2.setHeader("Date", DateUtils.formatDate(nextSecond));
originResponse2.setHeader("Cache-Control", "max-age=7200");
originResponse2.setHeader("Expires", DateUtils.formatDate(inTwoHoursPlusASec));
originResponse2.setHeader("Vary", "Accept-Encoding");
final HttpRequestWrapper req3 = HttpRequestWrapper.wrap(
new BasicHttpRequest("GET", "/", HttpVersion.HTTP_1_1));
req3.addHeader("Range", "bytes=0-50");
req3.addHeader("Accept-Encoding", "gzip");
backendExpectsAnyRequest().andReturn(originResponse);
backendExpectsAnyRequestAndReturn(originResponse2).times(1, 2);
replayMocks();