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