ByteArray ba = getByteArrayFactory().create(1);
ba.put(0, (byte) 99);
IoBuffer bb = IoBuffer.allocate(2);
bb.clear();
Cursor cursor = ba.cursor();
assertEquals(0, cursor.getIndex());
assertEquals(1, cursor.getRemaining());
assertEquals(0, bb.position());
assertEquals(2, bb.remaining());
cursor.get(bb);
assertEquals(1, cursor.getIndex());
assertEquals(0, cursor.getRemaining());
assertEquals(1, bb.position());
assertEquals(1, bb.remaining());
}