@Test public void testClear() throws Exception { final long key1 = randomKey(); final long key2 = randomKey(); hsa.ensure(key1, key2); hsa.clear(); assertEquals(NULL_ADDRESS, hsa.get(key1, key2)); assertEquals(0, hsa.size()); }
@Test(expected = AssertionError.class) @RequireAssertEnabled public void testClear_whenDisposed() throws Exception { hsa.dispose(); hsa.clear(); }