@Override
    public int size2SizeIdx(int size) {
        return sizeClass.size2SizeIdx(size);
    }
@Test
    public void testSize2SizeIdx() {
        SizeClasses sc = new SizeClasses(PAGE_SIZE, PAGE_SHIFTS, CHUNK_SIZE, 0);
        PoolArena<ByteBuffer> arena = new PoolArena.DirectArena(null, sc);

        for (int sz = 0; sz <= CHUNK_SIZE; sz++) {
            int sizeIdx = arena.sizeClass.size2SizeIdx(sz);
            assertTrue(sz <= arena.sizeClass.sizeIdx2size(sizeIdx));
            if (sizeIdx > 0) {
                assertTrue(sz > arena.sizeClass.sizeIdx2size(sizeIdx - 1));
            }
        }
    }