CaselessStringWrapper { @Override public int hashCode() { return caselessString == null ? 0 : caselessString.hashCode(); } CaselessStringWrapper(String string); String getString(); String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test public void testHashCode() throws Exception { assertEquals(caselessString.hashCode(), new CaselessStringWrapper(string.toUpperCase()).hashCode()); }