assertEquals(16, buffer.capacity());
assertEquals(4, buffer.length());
assertFalse(buffer.isEmpty());
assertFalse(buffer.isFull());
byte[] b2 = buffer.toByteArray();
assertNotNull(b2);
assertEquals(4, b2.length);
for (int i = 0; i < tmp.length; i++) {
assertEquals(tmp[i], b2[i]);
assertEquals(tmp[i], buffer.byteAt(i));