private void setAmbryHeadersForPut(JSONObject headers, String ttlInSecs, String serviceId, Container container,
      String contentType, String ownerId, boolean insertAccount) throws JSONException {
    headers.putOpt(RestUtils.Headers.TTL, ttlInSecs);
    headers.putOpt(RestUtils.Headers.SERVICE_ID, serviceId);
    headers.putOpt(RestUtils.Headers.AMBRY_CONTENT_TYPE, contentType);
    headers.putOpt(RestUtils.Headers.OWNER_ID, ownerId);
    if (insertAccount) {
      headers.putOpt(RestUtils.InternalKeys.TARGET_ACCOUNT_KEY, InMemAccountService.UNKNOWN_ACCOUNT);
    }
    if (container != null) {
      headers.putOpt(RestUtils.InternalKeys.TARGET_CONTAINER_KEY, container);
    }
  }
Sets headers that helps build {@link BlobProperties} on the server. See argument list for the headers that are set.
Any other headers have to be set explicitly.
@param headers the {@link JSONObject} where the headers should be set.
@param ttlInSecs sets the {@link RestUtils.Headers#TTL} header.
@param serviceId sets the {@link RestUtils.Headers#SERVICE_ID} header.
@param container used to set the container for {@link RestUtils.InternalKeys#TARGET_CONTAINER_KEY}.
@param contentType sets the {@link RestUtils.Headers#AMBRY_CONTENT_TYPE} header.
@param ownerId sets the {@link RestUtils.Headers#OWNER_ID} header. Optional - if not required, send null.
@param insertAccount {@code true} if {@link Account} info has to be injected into the headers.
@throws JSONException
ambry-api/src/test/java/com/github/ambry/rest/RestUtilsTest.java