// readonly's contents should be the same as buf
DoubleBuffer readonly = buf.asReadOnlyBuffer();
assertNotSame(buf, readonly);
assertTrue(readonly.isReadOnly());
assertEquals(buf.position(), readonly.position());
assertEquals(buf.limit(), readonly.limit());
assertEquals(buf.isDirect(), readonly.isDirect());
assertEquals(buf.order(), readonly.order());
assertContentEquals(buf, readonly);
// readonly's position, mark, and limit should be independent to buf