ByteBuf in = Unpooled.wrappedBuffer(new byte[] {
'n', 'e', 't', 't', 'y'
});
channel.writeOutbound(in.copy());
in.readerIndex(0); // rewind the buffer to write the same data
channel.writeOutbound(in.copy());
assertTrue(channel.finish());
ByteBuf expected = Unpooled.wrappedBuffer(new byte[] {
(byte) 0xff, 0x06, 0x00, 0x00, 0x73, 0x4e, 0x61, 0x50, 0x70, 0x59,