@Test
public void windowUpdateFrameDecrementsConsumedBytes() throws Exception {

    frameListener.onHeadersRead(http2HandlerCtx, 3, request, 31, false);
    Http2Connection connection = frameCodec.connection();
    Http2Stream stream = connection.stream(3);
    assertNotNull(stream);
    ByteBuf data = Unpooled.buffer(100).writeZero(100);
    frameListener.onDataRead(http2HandlerCtx, 3, data, 0, true);
    Http2HeadersFrame inboundHeaders = inboundHandler.readInbound();
    assertNotNull(inboundHeaders);
    assertNotNull(inboundHeaders.stream());
    Http2FrameStream stream2 = inboundHeaders.stream();
    int before = connection.local().flowController().unconsumedBytes(stream);
    ChannelFuture f = channel.write(new DefaultHttp2WindowUpdateFrame(100).stream(stream2));
    int after = connection.local().flowController().unconsumedBytes(stream);
    assertEquals(100, before - after);
    assertTrue(f.isSuccess());
    data.release();
}