AbstractLocator implements LocatorIF, Serializable { @Override public boolean equals(Object object) { try { LocatorIF locator = (LocatorIF)object; return getAddress().equals(locator.getAddress()) && getNotation().equalsIgnoreCase(locator.getNotation()); } catch (ClassCastException e) { return false; } catch (NullPointerException e) { return false; } }  @Override boolean equals(Object object); @Override int hashCode(); @Override String toString();  }
@Test public void testEqualsNullArgument() { LocatorIF locator = createLocator(); Assert.assertFalse("checking equality with null object", locator.equals(null)); }