@Test
public void testDuplicate() {

   byte[] data = new byte[] {0, 1, 2, 3, 4};
   ByteBuf byteBuffer = Unpooled.wrappedBuffer(data);
   NettyReadable buffer = new NettyReadable(byteBuffer);
   ReadableBuffer duplicate = buffer.duplicate();
   for (int i = 0; i < data.length; i++) {
      assertEquals(data[i], duplicate.get());
   }
   assertFalse(duplicate.hasRemaining());
}