/**
* @tests java.security.Identity#equals(java.lang.Object)
*/
public void test_equalsLjava_lang_Object() throws Exception {
IdentitySubclass sub = new IdentitySubclass("test",
new IdentityScopeSubclass());
CertificateFactory cf = CertificateFactory.getInstance("X.509");
X509Certificate cert[] = new X509Certificate[1];
cert[0] = (X509Certificate) cf.generateCertificate(certArray);
sub.setPublicKey(cert[0].getPublicKey());
CertificateImpl certImpl = new CertificateImpl(cert[0]);
sub.addCertificate(certImpl);
IdentitySubclass sub2 = new IdentitySubclass("test",
new IdentityScopeSubclass());
assertEquals("the two Identity objects are not equal", sub2, sub);
}