### Question:
LongSet implements Serializable, Cloneable, Iterable<Long> { public void clear() { numEntries = 0; numSlotsUsed = 0; Arrays.fill(keys, NULL); } LongSet();  LongSet(int initialCapacity); int size(); boolean isEmpty(); boolean contains(long key); boolean add(long key); @Override LongPrimitiveIterator iterator(); long[] toArray(); boolean remove(long key); boolean addAll(long[] keys); boolean addAll(LongSet keys); void clear(); void rehash(); int intersectionSize(LongSet other); @Override LongSet clone(); @Override int hashCode(); @Override boolean equals(Object other); @Override String toString();  }### Answer:
@Test public void testClear() { LongSet set = new LongSet(); set.add(1); set.clear(); assertEquals(0, set.size()); assertTrue(set.isEmpty()); assertFalse(set.contains(1)); }