private String verifyPostAndReturnBlobId(RestRequest restRequest, MockRestResponseChannel restResponseChannel,
      Account expectedAccount, Container expectedContainer) {
    assertEquals("Unexpected response status", ResponseStatus.Created, restResponseChannel.getStatus());
    assertTrue("No Date header", restResponseChannel.getHeader(RestUtils.Headers.DATE) != null);
    assertTrue("No " + RestUtils.Headers.CREATION_TIME,
        restResponseChannel.getHeader(RestUtils.Headers.CREATION_TIME) != null);
    assertEquals("Content-Length is not 0", "0", restResponseChannel.getHeader(RestUtils.Headers.CONTENT_LENGTH));
    assertNull("Content-Range header should not be set",
        restResponseChannel.getHeader(RestUtils.Headers.CONTENT_RANGE));
    assertEquals("Wrong account object in RestRequest's args", expectedAccount,
        restRequest.getArgs().get(RestUtils.InternalKeys.TARGET_ACCOUNT_KEY));
    assertEquals("Wrong container object in RestRequest's args", expectedContainer,
        restRequest.getArgs().get(RestUtils.InternalKeys.TARGET_CONTAINER_KEY));
    String blobId = restResponseChannel.getHeader(RestUtils.Headers.LOCATION);
    assertNotNull("Did not get a blobId", blobId);
    return blobId;
  }
Verifies POST response on {@code restResponseChannel} in response to {@code restRequest}.
@param restRequest the {@link RestRequest} that was sent.
@param restResponseChannel the {@link MockRestResponseChannel} over which response was received.
@param expectedAccount the expected {@link Account} instance injected into the {@link RestRequest}.
@param expectedContainer the expected {@link Container} instance injected into the {@link RestRequest}.
@return the blob ID of the blob.
ambry-frontend/src/test/java/com/github/ambry/frontend/FrontendRestRequestServiceTest.java