ShortSet implements Serializable { public void clear() { size = 0; } ShortSet(int capacity); void add(short key); void addAll(ShortSet that); void addKnownAbsent(short key); void clear(); boolean contains(short key); void copyDataFrom(ShortSet that); @Override boolean equals(Object obj); short get(int i); @Override int hashCode(); void remove(short key); void removeKnownPresent(int key); int size(); @Override String toString(); String toString(CoordinateSystem coords);  }
@Test public void testClear() { assertEquals(0, set.size()); set.add((short)42); assertEquals(1, set.size()); set.clear(); assertEquals(0, set.size()); }