@Test
public void testRemaining() {

   ByteBuf buffer = Unpooled.buffer(1024);
   NettyWritable writable = new NettyWritable(buffer);
   assertEquals(buffer.maxCapacity(), writable.remaining());
   writable.put((byte) 0);
   assertEquals(buffer.maxCapacity() - 1, writable.remaining());
}