@Test
public void testValidateBadCertificateByteArray() {

    try {
        BufferedInputStream bis = new BufferedInputStream(this.getClass().getResourceAsStream("/notsigned.crt"));
        byte[] certBytes = IOUtils.toByteArray(bis);
        assertFalse(crypto.validateCertificate(certBytes));
    } catch (IOException e) {
        Assert.fail("cannot read cert file");
    }
}