@Test
void testEncodingWithNullMetadata() {

  ByteBuf frame =
      RequestStreamFrameCodec.encode(
          ByteBufAllocator.DEFAULT,
          1,
          false,
          1,
          null,
          Unpooled.copiedBuffer("d", StandardCharsets.UTF_8));
  frame = FrameLengthCodec.encode(ByteBufAllocator.DEFAULT, frame.readableBytes(), frame);
  // Encoded FrameLength⌍        ⌌ Encoded Headers
  //                   |        |         ⌌ Encoded Request(1)
  //                   |        |         |     ⌌Encoded Data
  //                 __|________|_________|_____|
  //                 ↓<-> ↓↓   <->    ↓↓ <->  ↓↓↓
  String expected = "00000b0000000118000000000164";
  assertEquals(expected, ByteBufUtil.hexDump(frame));
  frame.release();
}