public void testAllocate() throws Exception {
for (int i = 10; i < 1048576 * 2; i = i * 11 / 10) // increase by 10%
{
IoBuffer buf = IoBuffer.allocate(i);
assertEquals(0, buf.position());
assertEquals(buf.capacity(), buf.remaining());
assertTrue(buf.capacity() >= i);
assertTrue(buf.capacity() < i * 2);
}
}