public static void addBlobToMessageSet(MockMessageWriteSet messageWriteSet, BlobId blobId, long size,
      long expiresAtMs, long operationTime, boolean isVcr) {
    long crc = new Random().nextLong();
    MessageInfo info =
        new MessageInfo(blobId, size, false, true, false, expiresAtMs, crc, (short) 50, (short) 100, operationTime,
            initLifeVersion(isVcr));
    ByteBuffer buffer = ByteBuffer.wrap(TestUtils.getRandomBytes((int) size));
    messageWriteSet.add(info, buffer);
  }
Utility method to add a BlobId and generated byte buffer to the specified MessageWriteSet.
@param messageWriteSet the {@link MockMessageWriteSet} in which to store the data.
@param blobId the blobId to add.
@param size the size of the byte buffer.
@param expiresAtMs the expiration time.
@param operationTime the operation time.
@param isVcr is the test running as vcr.
ambry-cloud/src/test/java/com/github/ambry/cloud/CloudTestUtil.java