Code example for Certificate

Methods: equalshashCode

0
     */ 
    public final void testHashCodeEqualsObject() { 
        Certificate c1 = new MyCertificate("TEST_TYPE", testEncoding);
        Certificate c2 = new MyCertificate("TEST_TYPE", testEncoding);
 
        assertTrue((c1.hashCode() == c2.hashCode()) && c1.equals(c2));
        assertFalse(cert.equals(c1));
    } 
 
 
    /** 
     * Test for <code>getType()</code> method<br> 
     * Assertion: returns this certificate type 
     */ 
    public final void testGetType() { 
        Certificate c1 = new MyCertificate("TEST_TYPE", testEncoding);
        assertEquals("TEST_TYPE", c1.getType());
    } 
 
    /** 
     * Test #1 for <code>equals(Object)</code> method<br>