@Test
public void shouldFetchKeysAgainAfterExpirationAccountingForAgeHeader() throws Exception {

  KeysDownloader instance = newInstanceForTests();
  httpResponseBuilder =
      new HttpResponseBuilder()
          .setContent("keys1")
          .setCacheControlWithMaxAgeInSeconds(3L)
          .setAgeInSeconds(1L);
  // Fetched and cached keys
  assertEquals("keys1", instance.download());
  // Keys changed
  httpResponseBuilder = new HttpResponseBuilder().setContent("keys2");
  // 2 seconds later ...
  currentTimeInMillis += 2000L;
  // New keys are fetched and returned
  assertEquals("keys2", instance.download());
}