@Test
  public void testEmptyMsgInfoList() throws Exception {
    MessageSievingInputStream sievedStream =
        new MessageSievingInputStream(null, Collections.emptyList(), Collections.emptyList(), new MetricRegistry());
    Assert.assertFalse(sievedStream.hasInvalidMessages());
    Assert.assertEquals(0, sievedStream.getSize());
    Assert.assertEquals(0, sievedStream.getValidMessageInfoList().size());
  }
If there are no messages in the Message info list, the returned stream should be empty.
ambry-messageformat/src/test/java/com/github/ambry/messageformat/MessageSievingInputStreamTest.java