@Test
public void testLoadX509Certificates() {

    X509Certificate[] certs = Crypto.loadX509Certificates("src/test/resources/x509_certs_comments.pem");
    assertTrue(certs.length == 3);
    certs = Crypto.loadX509Certificates("src/test/resources/x509_certs_no_comments.pem");
    assertTrue(certs.length == 3);
    // invalid file
    try {
        Crypto.loadX509Certificates("src/test/resources/not_present_certs");
        fail();
    } catch (CryptoException ignored) {
    }
    // invalid cert
    try {
        Crypto.loadX509Certificates("src/test/resources/invalid_x509.cert");
        fail();
    } catch (CryptoException ignored) {
    }
    // no cert
    try {
        Crypto.loadX509Certificates("src/test/resources/ec_public.key");
        fail();
    } catch (CryptoException ignored) {
    }
}