Source:
private void verifyBlobPropertiesConstructionSuccess(JSONObject headers) throws Exception { RestRequest restRequest = createRestRequest(RestMethod.POST, "/", headers); restRequest.setArg(RestUtils.InternalKeys.TARGET_ACCOUNT_KEY, Account.UNKNOWN_ACCOUNT); restRequest.setArg(RestUtils.InternalKeys.TARGET_CONTAINER_KEY, Container.UNKNOWN_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()); boolean expectedIsPrivate = false; if (headers.has(RestUtils.Headers.PRIVATE) && !JSONObject.NULL.equals(headers.get(RestUtils.Headers.PRIVATE))) { expectedIsPrivate = headers.getBoolean(RestUtils.Headers.PRIVATE); } assertEquals("Blob isPrivate does not match", expectedIsPrivate, 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()); } }

Target:
private void verifyBlobPropertiesConstructionSuccess(JSONObject headers) throws Exception { RestRequest restRequest = createRestRequest(RestMethod.POST, "/", headers); restRequest.setArg(RestUtils.InternalKeys.TARGET_ACCOUNT_KEY, Account.UNKNOWN_ACCOUNT); restRequest.setArg(RestUtils.InternalKeys.TARGET_CONTAINER_KEY, Container.UNKNOWN_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()); boolean expectedIsPrivate = false; if (headers.has(RestUtils.Headers.PRIVATE) && !JSONObject.NULL.equals(headers.get(RestUtils.Headers.PRIVATE))) { expectedIsPrivate = headers.getBoolean(RestUtils.Headers.PRIVATE); } assertEquals("Blob isPrivate does not match", expectedIsPrivate, 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.UNKNOWN_ACCOUNT_ID, blobProperties.getAccountId()); assertEquals("Target container id does not match", Container.UNKNOWN_CONTAINER_ID, blobProperties.getContainerId()); }