### Question:
Http2MultiplexCodec extends Http2FrameCodec { @Override final void onHttp2StreamWritabilityChanged( final ChannelHandlerContext ctx, final Http2FrameStream stream, final boolean writable) { (((Http2MultiplexCodecStream) stream).channel).writabilityChanged(writable); } Http2MultiplexCodec(
      final Http2ConnectionEncoder encoder,
      final Http2ConnectionDecoder decoder,
      final Http2Settings initialSettings,
      final ChannelHandler inboundStreamHandler,
      final ChannelHandler upgradeStreamHandler,
      final boolean decoupleCloseAndGoAway); @Override void onHttpClientUpgrade(); @Override final void handlerAdded0(final ChannelHandlerContext ctx); @Override final void handlerRemoved0(final ChannelHandlerContext ctx); @Override final void channelReadComplete(final ChannelHandlerContext ctx); @Override final void channelRead(final ChannelHandlerContext ctx, final Object msg);  }### Answer:
@Test public void writabilityAndFlowControl() { final LastInboundHandler inboundHandler = new LastInboundHandler(); final Http2StreamChannel childChannel = newInboundStream(3, false, inboundHandler); assertEquals("", inboundHandler.writabilityStates()); assertTrue(childChannel.isWritable()); childChannel.writeAndFlush(new DefaultHttp2HeadersFrame(new DefaultHttp2Headers())); codec.onHttp2StreamWritabilityChanged(codec.ctx, childChannel.stream(), true); assertTrue(childChannel.isWritable()); assertEquals("", inboundHandler.writabilityStates()); codec.onHttp2StreamWritabilityChanged(codec.ctx, childChannel.stream(), true); assertTrue(childChannel.isWritable()); assertEquals("", inboundHandler.writabilityStates()); codec.onHttp2StreamWritabilityChanged(codec.ctx, childChannel.stream(), false); assertFalse(childChannel.isWritable()); assertEquals("false", inboundHandler.writabilityStates()); codec.onHttp2StreamWritabilityChanged(codec.ctx, childChannel.stream(), false); assertFalse(childChannel.isWritable()); assertEquals("false", inboundHandler.writabilityStates()); }