@Test
public void testLoadX509CertificateString() throws IOException {

    Path path = Paths.get("src/test/resources/valid_cn_x509.cert");
    String certStr = new String(Files.readAllBytes(path));
    X509Certificate cert = Crypto.loadX509Certificate(certStr);
    assertNotNull(cert);
    assertEquals(cert.getSubjectX500Principal().getName(),
            "CN=athenz.syncer,O=My Test Company,L=Sunnyvale,ST=CA,C=US");
}