private void verifySuccessResponseOnTtlEnforcement(FutureResult<Void> postFuture, byte[] content, long blobTtlSecs,
      RestResponseChannel restResponseChannel, boolean expectWarning) throws Exception {
    postFuture.get(TIMEOUT_SECS, TimeUnit.SECONDS);

    String id = (String) restResponseChannel.getHeader(RestUtils.Headers.LOCATION);
    assertNotNull("There should be a blob ID returned", id);
    InMemoryRouter.InMemoryBlob blob = router.getActiveBlobs().get(id);
    assertNotNull("No blob with ID " + id, blob);
    assertEquals("Unexpected blob content stored", ByteBuffer.wrap(content), blob.getBlob());
    assertEquals("Unexpected ttl stored", blobTtlSecs, blob.getBlobProperties().getTimeToLiveInSeconds());

    if (expectWarning) {
      assertNotNull("There should be a non compliance warning",
          restResponseChannel.getHeader(RestUtils.Headers.NON_COMPLIANCE_WARNING));
    } else {
      assertNull("There should be no warning", restResponseChannel.getHeader(RestUtils.Headers.NON_COMPLIANCE_WARNING));
    }
  }
Verifies successful put when subject to enforcement of TTL
@param postFuture the {@link FutureResult} returned from the POST call
@param content the content being POSTed
@param blobTtlSecs the ttl of the blob (in secs)
@param restResponseChannel the {@link RestResponseChannel} over which the response is expected
@param expectWarning {@code true} if a warning header for non compliance is expected. {@code false} otherwise.
@throws Exception
ambry-frontend/src/test/java/com/github/ambry/frontend/PostBlobHandlerTest.java