public class BufferCloseTest extends MembufTestBase
{
public void testClosing() throws Exception
{
MemBuffersForBytes bufs = new MemBuffersForBytes(20, 4, 10);
ChunkyBytesMemBufferImpl buffer = (ChunkyBytesMemBufferImpl)bufs.createChunkyBuffer(2, 3);
SegmentAllocator<?> alloc = bufs.getAllocator();
// min size 2, so will allocate 2 right away
assertEquals(2, alloc.getBufferOwnedSegmentCount());
assertEquals(0, alloc.getReusableSegmentCount());