public static BlobId addBlobToMessageSet(MockMessageWriteSet messageWriteSet, long size, long expiresAtMs,
      short accountId, short containerId, boolean encrypted, boolean deleted, PartitionId partitionId,
      long operationTime, boolean isVcr) {
    BlobId id = getUniqueId(accountId, containerId, encrypted, partitionId);
    long crc = new Random().nextLong();
    MessageInfo info =
        new MessageInfo(id, size, deleted, true, false, expiresAtMs, crc, accountId, containerId, operationTime,
            initLifeVersion(isVcr));
    ByteBuffer buffer = ByteBuffer.wrap(TestUtils.getRandomBytes((int) size));
    messageWriteSet.add(info, buffer);
    return id;
  }
Utility method to generate a BlobId and byte buffer for a blob with specified properties and add them to the specified MessageWriteSet.
@param messageWriteSet the {@link MockMessageWriteSet} in which to store the data.
@param size the size of the byte buffer.
@param expiresAtMs the expiration time.
@param accountId the account Id.
@param containerId the container Id.
@param encrypted the encrypted bit.
@param deleted true if blob is deleted.
@param partitionId the partition id.
@param operationTime the operation time.
@param isVcr flag to indicate if running as vcr.
@return the generated {@link BlobId}.
ambry-cloud/src/test/java/com/github/ambry/cloud/CloudTestUtil.java