LdapRdn implements Serializable, Comparable { public boolean equals(Object obj) { if (obj == null || obj.getClass() != this.getClass()) { return false; } LdapRdn that = (LdapRdn) obj; if(this.components.size() != that.components.size()) { return false; } Set<Map.Entry<String,LdapRdnComponent>> theseEntries = this.components.entrySet(); for (Map.Entry<String, LdapRdnComponent> oneEntry : theseEntries) { if(!oneEntry.getValue().equals(that.components.get(oneEntry.getKey()))) { return false; } } return true; } LdapRdn();  LdapRdn(String string);  LdapRdn(String key, String value); void addComponent(LdapRdnComponent rdnComponent); List getComponents(); LdapRdnComponent getComponent(); LdapRdnComponent getComponent(int idx); String getLdapEncoded(); String encodeUrl(); int compareTo(Object obj); boolean equals(Object obj); int hashCode(); String toString(); String getValue(); String getKey(); String getValue(String key); LdapRdn immutableLdapRdn();  }
@Test public void testEquals() throws Exception { final Object originalObject = new LdapRdn("cn", "john.doe"); final Object identicalObject = new LdapRdn("cn", "john.doe"); final Object differentObject = new LdapRdn("cn", "john.svensson"); final Object subclassObject = new LdapRdn("cn", "john.doe") { private static final long serialVersionUID = 1L; }; new EqualsTester(originalObject, identicalObject, differentObject, subclassObject); }