SimpleHashLookup { public void clear() { Arrays.fill(nexts, -1); Arrays.fill(hashes, -1); Arrays.fill(heads, -1); load = (loadFactor * heads.length) >> 10; size = 0; } SimpleHashLookup(); int getSize(); void put(int entryId); boolean removeEntry(int entryId); int seek(K key); int seekNextDuplicate(K key, int prevEntryId); void clear(); void reset();  }
@Test public void test_clear() { HashStore store = new HashStore(); int[] vals = serie(2000, -1000, 3); store.add(vals); verify(store, vals); store.clear(); verify(store); store.add(vals); verify(store, vals); }