duplicate = original.asReadOnlyBuffer();
original.put(4, (byte) 127);
assertEquals(4, duplicate.position());
assertEquals(10, duplicate.limit());
assertEquals(16, duplicate.capacity());
assertNotSame(original.buf(), duplicate.buf());
assertEquals(127, duplicate.get(4));
// Try to expand.
try {
original = IoBuffer.allocate(16);