Assert.assertEquals(request.cas(), encoded.readLong());
Assert.assertEquals(request.flags(), encoded.readInt());
Assert.assertEquals(request.expires(), encoded.readInt());
byte[] data = new byte[encoded.readableBytes()];
encoded.readBytes(data);
Assert.assertArrayEquals((request.key() + request.body()).getBytes(CharsetUtil.UTF_8), data);
Assert.assertFalse(encoded.isReadable());
Assert.assertFalse(channel.finish());
Assert.assertNull(channel.readInbound());