private void updateBlobTtlAndVerify(String blobId, JSONObject expectedHeaders, Account expectedAccount,
      Container expectedContainer, boolean attachPreconditions) throws Exception {
    JSONObject headers = new JSONObject();
    setUpdateTtlHeaders(headers, blobId, "updateBlobTtlAndVerify");
    if (attachPreconditions) {
      setAccountAndContainerHeaders(headers, expectedAccount.getName(), expectedContainer.getName());
    }
    RestRequest restRequest = createRestRequest(RestMethod.PUT, Operations.UPDATE_TTL, headers, null);
    verifyUpdateBlobTtlResponse(restRequest);
    expectedHeaders.remove(RestUtils.Headers.TTL);
    getBlobInfoAndVerify(blobId, GetOption.None, expectedHeaders, expectedAccount, expectedContainer);
  }
Updates the TTL of the blob with blob ID {@code blobId} and verifies that the operation succeeded.
@param blobId the blob ID of the blob to HEAD.
@param expectedHeaders the expected headers in the GET response triggered for verification.
@param expectedAccount the expected account in the GET response triggered for verification. Also used to attach
                       preconditions if required
@param expectedContainer the expected container in the GET response triggered for verification. Also used to attach
                       preconditions if required
@param attachPreconditions if {@code true}, attaches preconditions to the request
@throws Exception
ambry-frontend/src/test/java/com/github/ambry/frontend/FrontendRestRequestServiceTest.java