LanguageImpl implements Language { public boolean equals(Object obj) { if (obj instanceof Language) { return ((Language) obj).getLocale().equals(locale); } return false; } LanguageImpl(Locale locale); Locale getLocale(); String getDescription(); String getDescription(Language language); String getIdentifier(); int compareTo(Language l); boolean equals(Object obj); int hashCode(); String toString();  }
@Test public void testEqualsObject() { assertTrue(english.equals(english)); assertTrue(english.equals(new LanguageImpl(new Locale("en")))); assertFalse(french.equals(english)); }