@Test
public void testRoleCertValidate() throws IOException {

    Path path = Paths.get("src/test/resources/athenz_role_uri.csr");
    String csr = new String(Files.readAllBytes(path));
    Set<String> orgValues = new HashSet<>();
    orgValues.add("Athenz");
    X509RoleCertRequest certReq = new X509RoleCertRequest(csr);
    assertTrue(certReq.validate("athenz.production", "proxy.service", orgValues));
    assertTrue(certReq.validate("athenz.production", "proxy.service", null));
    assertFalse(certReq.validate("athenz.api", "proxy.service", orgValues));
    assertFalse(certReq.validate("athenz.production", "proxy.api", orgValues));
    Set<String> orgValues2 = new HashSet<>();
    orgValues2.add("sports");
    assertFalse(certReq.validate("athenz.production", "proxy.service", orgValues2));
}