Code example for X509Certificate

Methods: getVersion

0
            // The requested certificate type is not available. 
            // Test can not be applied. 
            return; 
        } 
        assertEquals("The version is not correct.",
                                                tbt_cert.getVersion(), 2);
    } 
 
    /** 
     * getSerialNumber() method testing. 
     */ 
    public void testGetSerialNumber() { 
        if (this.cert == null) {
            // The requested certificate type is not available. 
            // Test can not be applied. 
            return; 
        } 
        assertEquals("The serial number is not correct.",
                            tbt_cert.getSerialNumber(), cert.getSerialNumber());
    } 
Connect your IDE to all the code out there  Get Codota for Java