assertEquals(buf.isDirect(), duplicate.isDirect());
assertEquals(buf.order(), duplicate.order());
assertContentEquals(buf, duplicate);
// duplicate's position, mark, and limit should be independent to buf
duplicate.reset();
assertEquals(duplicate.position(), 0);
duplicate.clear();
assertEquals(buf.position(), buf.limit());
buf.reset();
assertEquals(buf.position(), 0);