public void testHashcode() { int[] ints = {1138, 42, 86, 99, 101}; TIntSet set = new TIntHashSet(); set.addAll(ints); TIntSet other = new TIntHashSet(); other.addAll(ints); assertTrue( "hashcodes incorrectly not equal: " + set + ", " + other, set.hashCode() == other.hashCode()); int[] mismatched = {72, 49, 53, 1024, 999}; TIntSet unequal = new TIntHashSet(); unequal.addAll(mismatched); assertFalse( "hashcodes unlikely equal: " + set + ", " + unequal, set.hashCode() == unequal.hashCode()); }