protected void initChannel(Channel ch) throws Exception {
ch.pipeline().addLast(handler);
}
});
ChannelPipeline pipeline = channel.pipeline();
Assert.assertSame(handler, pipeline.firstContext().handler());
Assert.assertTrue(channel.writeInbound(3));
Assert.assertTrue(channel.finish());
Assert.assertSame(first, channel.readInbound());
Assert.assertSame(second, channel.readInbound());
Assert.assertNull(channel.readInbound());