original.put(4, (byte) 127);
Assert.assertEquals(4, duplicate.position());
Assert.assertEquals(10, duplicate.limit());
Assert.assertEquals(16, duplicate.capacity());
Assert.assertNotSame(original.buf(), duplicate.buf());
Assert.assertSame(original.buf().array(), duplicate.buf().array());
Assert.assertEquals(127, duplicate.get(4));
// Test a duplicate of a duplicate.
original = IoBuffer.allocate(16);
duplicate = original.duplicate().duplicate();