@Test
public void testValidateCertificate() {

    try {
        BufferedInputStream pem = new BufferedInputStream(new ByteArrayInputStream(pemCert));
        X509Certificate cert = (X509Certificate) cf.generateCertificate(pem);
        assertTrue(crypto.validateCertificate(cert));
    } catch (CertificateException e) {
        Assert.fail("cannot read cert file");
    }
}