buf.capacity(32).clear();
assertEquals(32, buf.capacity());
// Make sure the buffer doesn't shrink when more than 1/4 is being used.
buf.sweep((byte) 1);
buf.fill(23);
buf.compact();
assertEquals(32, buf.capacity());
assertEquals(9, buf.position());
assertEquals(32, buf.limit());
buf.clear();