void verifyCacheHeaders(boolean isPrivate, HttpResponse response, long cacheValiditySeconds,
      Long cacheTtlFromContainer) {
    if (isPrivate) {
      Assert.assertEquals("Cache-Control value not as expected", "private, no-cache, no-store, proxy-revalidate",
          response.headers().get(RestUtils.Headers.CACHE_CONTROL));
      Assert.assertEquals("Pragma value not as expected", "no-cache", response.headers().get(RestUtils.Headers.PRAGMA));
    } else {
      String expiresValue = response.headers().get(RestUtils.Headers.EXPIRES);
      assertNotNull("Expires value should be non null", expiresValue);
      assertTrue("Expires value should be in future",
          RestUtils.getTimeFromDateString(expiresValue) > System.currentTimeMillis());
      if (cacheTtlFromContainer != null) {
        cacheValiditySeconds = cacheTtlFromContainer.longValue();
      }
      Assert.assertEquals("Cache-Control value not as expected", "max-age=" + cacheValiditySeconds,
          response.headers().get(RestUtils.Headers.CACHE_CONTROL));
      Assert.assertNull("Pragma value should not have been set", response.headers().get(RestUtils.Headers.PRAGMA));
    }
  }
Verifies that the right cache headers are returned.
@param isPrivate {@code true} if the blob is private, {@code false} if not.
@param response the {@link HttpResponse}.
ambry-frontend/src/integration-test/java/com/github/ambry/frontend/FrontendIntegrationTestBase.java