@After public void tearDown() { cache.shutdown(); }
@Test public void testElementPlacement() { assertEquals(cache.getHigherBlock(BLOCK_SIZE).getKey().intValue(), (BLOCK_SIZE * 11 / 10)); assertEquals( cache.getHigherBlock((BLOCK_SIZE * 2)).getKey().intValue(), (BLOCK_SIZE * 21 / 10)); }
@Before public void setup() { cache = new SlabCache(CACHE_SIZE + BLOCK_SIZE * 2, BLOCK_SIZE); cache.addSlabByConf(new Configuration()); }