@Test
public void readHeaderAndData() throws Http2Exception {

    ByteBuf input = Unpooled.buffer();
    ByteBuf dataPayload = Unpooled.buffer();
    try {
        Http2Headers headers = new DefaultHttp2Headers()
                .authority("foo")
                .method("get")
                .path("/")
                .scheme("https");
        dataPayload.writeByte(1);
        writeHeaderFrameWithData(input, 1, headers, dataPayload);
        frameReader.readFrame(ctx, input, listener);
        verify(listener).onHeadersRead(ctx, 1, headers, 0, false);
        verify(listener).onDataRead(ctx, 1, dataPayload.slice(0, 1), 0, true);
    } finally {
        input.release();
        dataPayload.release();
    }
}