### Question:
LongObjectMap implements Serializable, Cloneable { public void clear() { numEntries = 0; numSlotsUsed = 0; Arrays.fill(keys, NULL); Arrays.fill(values, null); } LongObjectMap();  LongObjectMap(int size); V get(long key); int size(); boolean isEmpty(); boolean containsKey(long key); boolean containsValue(Object value); V put(long key, V value); V remove(long key); void clear(); LongPrimitiveIterator keySetIterator(); Set<MapEntry<V>> entrySet(); Collection<V> values(); void rehash(); @Override LongObjectMap<V> clone(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object other);  }### Answer:
@Test public void testClear() { LongObjectMap<Long> map = new LongObjectMap<Long>(); map.put(500000L, 2L); map.clear(); assertEquals(0, map.size()); assertTrue(map.isEmpty()); assertNull(map.get(500000L)); }