コード例 #1
0
  @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());
  }
コード例 #2
0
 @Test(expected = AssertionError.class)
 @RequireAssertEnabled
 public void testClear_whenDisposed() throws Exception {
   hsa.dispose();
   hsa.clear();
 }