@Test
public void testValidateRoleIPAddressCertIPs() throws IOException {

    Path path = Paths.get("src/test/resources/role_single_ip.csr");
    String csr = new String(Files.readAllBytes(path));
    path = Paths.get("src/test/resources/svc_single_ip.pem");
    String pem = new String(Files.readAllBytes(path));
    X509Certificate cert1 = Crypto.loadX509Certificate(pem);
    path = Paths.get("src/test/resources/svc_multiple_ip.pem");
    pem = new String(Files.readAllBytes(path));
    X509Certificate cert2 = Crypto.loadX509Certificate(pem);
    X509RoleCertRequest certReq = new X509RoleCertRequest(csr);
    assertTrue(certReq.validateIPAddress(cert1, "10.11.12.13"));
    assertTrue(certReq.validateIPAddress(cert2, "10.11.12.13"));
}