private void verifyBlobPropertiesConstructionSuccess(JSONObject headers) throws Exception {
    RestRequest restRequest = createRestRequest(RestMethod.POST, "/", headers);
    Account account = (Account) headers.get(RestUtils.InternalKeys.TARGET_ACCOUNT_KEY);
    Container container = (Container) headers.get(RestUtils.InternalKeys.TARGET_CONTAINER_KEY);
    restRequest.setArg(RestUtils.InternalKeys.TARGET_ACCOUNT_KEY, account);
    restRequest.setArg(RestUtils.InternalKeys.TARGET_CONTAINER_KEY, container);
    BlobProperties blobProperties = RestUtils.buildBlobProperties(restRequest.getArgs());
    long expectedTTL = Utils.Infinite_Time;
    if (headers.has(RestUtils.Headers.TTL) && !JSONObject.NULL.equals(headers.get(RestUtils.Headers.TTL))) {
      expectedTTL = headers.getLong(RestUtils.Headers.TTL);
    }
    assertEquals("Blob TTL does not match", expectedTTL, blobProperties.getTimeToLiveInSeconds());
    assertEquals("Blob isPrivate does not match", !container.isCacheable(), blobProperties.isPrivate());
    assertEquals("Blob service ID does not match", headers.getString(RestUtils.Headers.SERVICE_ID),
        blobProperties.getServiceId());
    assertEquals("Blob content type does not match", headers.getString(RestUtils.Headers.AMBRY_CONTENT_TYPE),
        blobProperties.getContentType());
    if (headers.has(RestUtils.Headers.OWNER_ID) && !JSONObject.NULL.equals(headers.get(RestUtils.Headers.OWNER_ID))) {
      assertEquals("Blob owner ID does not match", headers.getString(RestUtils.Headers.OWNER_ID),
          blobProperties.getOwnerId());
    }
    assertEquals("Target account id does not match", account.getId(), blobProperties.getAccountId());
    assertEquals("Target container id does not match", container.getId(), blobProperties.getContainerId());
  }
Verifies that a request with headers defined by {@code headers} builds {@link BlobProperties} successfully and
matches the values of the properties with those in {@code headers}.
@param headers the headers that need to go with the request that is used to construct {@link BlobProperties}.
@throws Exception
ambry-api/src/test/java/com/github/ambry/rest/RestUtilsTest.java