@Test
void decodeEntryOnDoneBufferThrowsIllegalArgument() {

  ByteBuf fakeBuffer = ByteBufUtils.getRandomByteBuf(0);
  CompositeMetadata compositeMetadata = new CompositeMetadata(fakeBuffer, false);
  assertThatIllegalArgumentException()
      .isThrownBy(() -> compositeMetadata.iterator().next())
      .withMessage("entry index 0 is larger than buffer size");
}