public static PutMessageFormatInputStream getPutMessageInputStreamForBlob(BlobId blobId, int blobSize,
      Map<BlobId, Integer> blobIdToSizeMap, short accountId, short containerId) throws Exception {
    int userMetaDataSize = 100;
    byte[] userMetadata = new byte[userMetaDataSize];
    TestUtils.RANDOM.nextBytes(userMetadata);
    byte[] data = new byte[blobSize];
    BlobProperties blobProperties =
        new BlobProperties(blobSize, "serviceid1", null, null, false, Utils.Infinite_Time, accountId, containerId,
            false, null, null, null, null);
    TestUtils.RANDOM.nextBytes(data);
    blobIdToSizeMap.put(blobId, blobSize);
    return new PutMessageFormatInputStream(blobId, null, blobProperties, ByteBuffer.wrap(userMetadata),
        new ByteBufferInputStream(ByteBuffer.wrap(data)), blobSize);
  }
Create {@link PutMessageFormatInputStream} for a blob with given {@link BlobId} and update {@code blobIdToSizeMap}.
@param blobId {@link BlobId} object.
@param blobSize size of blob.
@param blobIdToSizeMap {@link Map} of {@link BlobId} to size of blob uploaded.
@return {@link PutMessageFormatInputStream} object.
@throws Exception
ambry-test-utils/src/main/java/com/github/ambry/server/ServerTestUtil.java