@Test
void hasEntry() {

  WellKnownMimeType mime = WellKnownMimeType.APPLICATION_AVRO;
  CompositeByteBuf buffer =
      Unpooled.compositeBuffer()
          .addComponent(
              true,
              CompositeMetadataCodec.encodeMetadataHeader(
                  ByteBufAllocator.DEFAULT, mime.getIdentifier(), 0))
          .addComponent(
              true,
              CompositeMetadataCodec.encodeMetadataHeader(
                  ByteBufAllocator.DEFAULT, mime.getIdentifier(), 0));
  assertThat(CompositeMetadataCodec.hasEntry(buffer, 0)).isTrue();
  assertThat(CompositeMetadataCodec.hasEntry(buffer, 4)).isTrue();
  assertThat(CompositeMetadataCodec.hasEntry(buffer, 8)).isFalse();
}