@Test
public void testParseCertificateNoEmail() throws Exception {

    CertificateIdentityParser parser = new CertificateIdentityParser(null, false);
    X509Certificate[] certs = new X509Certificate[]{ this.readCert("no_email_x509.cert") };
    CertificateIdentity certId = null;
    try {
        certId = parser.parse(certs);
    } catch (CertificateIdentityException e) {
        assertEquals(e.getMessage(), "Invalid role cert, no email SAN entry");
    } finally {
        assertNull(certId);
    }
}