ShortSet implements Serializable { @Override public int hashCode() { throw new UnsupportedOperationException( "ShortSets are not suitable for storing in hash tables"); } 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(expected=UnsupportedOperationException.class) public void testHashCode() { set.hashCode(); }