@Test
public void writeFrameHasPayload() throws Exception {

    byte[] payload = {(byte) 0x01, (byte) 0x03, (byte) 0x05, (byte) 0x07, (byte) 0x09};
    // will auto release after frameWriter.writeFrame succeed
    ByteBuf payloadByteBuf = Unpooled.wrappedBuffer(payload);
    frameWriter.writeFrame(ctx, (byte) 0xf, 0, new Http2Flags(), payloadByteBuf, promise);
    byte[] expectedFrameHeaderBytes = {
            (byte) 0x00, (byte) 0x00, (byte) 0x05, // payload length
            (byte) 0x0f, // payload type
            (byte) 0x00, // flags
            (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00 // stream id
    };
    expectedOutbound = Unpooled.copiedBuffer(expectedFrameHeaderBytes, payload);
    assertEquals(expectedOutbound, outbound);
}