BaseType { @Override public boolean equals(Object that) { if (this == that) { return true; } else if (that instanceof BaseType) { BaseType th = (BaseType)that; if (toString().equalsIgnoreCase(th.toString())) { return true; } } return false; }  @Override boolean equals(Object that); @Override int hashCode(); boolean isSameTypeAs(Object that);  }
@Test public void testEquals() { new EqualsTester() .addEqualityGroup(new TestType("a"), new TestType("A")) .addEqualityGroup(new TestType("Bd"), new TestType("bD")) .testEquals(); }