@Test
  public void testConstructor() throws MessageFormatException, IOException {
    HardDeleteMessageFormatInputStream inputStream = new HardDeleteMessageFormatInputStream(1000,
        MessageFormatRecord.UserMetadata_Version_V1, 100, MessageFormatRecord.Blob_Version_V3,
        BlobType.DataBlob, 2000);

    Assert.assertTrue(inputStream.streamLength > 0);
  }
Majority of the logic resides in the constructor. Test constructor to make sure it does not throw.
ambry-messageformat/src/test/java/com/github/ambry/messageformat/HardDeleteMessageFormatInputStreamTest.java