AclEntry implements java.io.Serializable { public boolean equals( Object o ) { if ( o instanceof AclEntry ) { AclEntry a = (AclEntry) o; if ( ( principalName.equals( a.principalName ) ) && ( permission.equals( a.permission ) ) ) { return true; } } return false; } AclEntry();  AclEntry( String principalName, String permission ); String getPrincipalName(); String getPermission(); void setPrincipalName( String principalName ); void setPermission( String permission ); boolean equals( Object o ); int hashCode(); String toString();  }
@Override @Test public void testHasValidBeanEquals() { AclEntry aclEntry1 = new AclEntry( "admin", "publish" ); AclEntry aclEntry2 = new AclEntry( "admin", "publish" ); AclEntry aclEntry3 = new AclEntry( "admin", "write" ); assertTrue( aclEntry1.equals( aclEntry2 ) ); assertFalse( aclEntry1.equals( aclEntry3 ) ); }