protected void assertPutRecord(ByteBuffer putRecordBuffer, ByteBuffer expectedPutRecordBuffer, MessageInfo info) {
    // The second short should be the lifeVersion, and it should match lifeVersion from info.
    putRecordBuffer.position(2);
    short lifeVersion = putRecordBuffer.getShort();
    assertEquals("LifeVersion doesn't match", lifeVersion, info.getLifeVersion());
    putRecordBuffer.position(32); // this is where header crc starts
    long crc = putRecordBuffer.getLong();
    expectedPutRecordBuffer.position(2);
    expectedPutRecordBuffer.putShort(lifeVersion);
    expectedPutRecordBuffer.position(32);
    expectedPutRecordBuffer.putLong(crc);
    assertArrayEquals(putRecordBuffer.array(), expectedPutRecordBuffer.array());
  }
Helper function to compare put record buffers.
ambry-replication/src/test/java/com/github/ambry/replication/ReplicationTestHelper.java