@Test
  public void testBlobDataConstructor() {
    ByteBuf buf = Unpooled.wrappedBuffer(new byte[] { 1, 2, 3, 4});
    BlobData data = new BlobData(BlobType.MetadataBlob, 100, buf);
    Assert.assertEquals(BlobType.MetadataBlob, data.getBlobType());
    Assert.assertEquals(100, data.getSize());
    Assert.assertFalse(data.isCompressed());

    // Test the other constructor.
    data = new BlobData(BlobType.MetadataBlob, 100, buf, true);
    Assert.assertTrue(data.isCompressed());
  }
Unit test Blob Data structure.  It's a simple structure with the majority of logic in constructor.
ambry-messageformat/src/test/java/com/github/ambry/messageformat/BlobDataTest.java