} catch (TooLongFrameException e) {
// expected
}
Assert.assertTrue(channel.writeInbound(buf.readSlice(buf.readableBytes()).retain()));
Assert.assertTrue(channel.finish());
ByteBuf b = channel.readInbound();
Assert.assertEquals(5, b.readableBytes());
Assert.assertEquals(1, b.readInt());
Assert.assertEquals('a', b.readByte());