assertEquals("All memory should be available", totalMemory, pool.availableMemory());
assertEquals("But now some is on the free list", totalMemory - size, pool.unallocatedMemory());
buffer = pool.allocate(size);
assertEquals("Recycled buffer should be cleared.", 0, buffer.position());
assertEquals("Recycled buffer should be cleared.", buffer.capacity(), buffer.limit());
pool.deallocate(buffer);
assertEquals("All memory should be available", totalMemory, pool.availableMemory());
assertEquals("Still a single buffer on the free list", totalMemory - size, pool.unallocatedMemory());
buffer = pool.allocate(2 * size);
pool.deallocate(buffer);
assertEquals("All memory should be available", totalMemory, pool.availableMemory());