@Test
public void testValidateSpiffeURI() throws IOException {

    Path path = Paths.get("src/test/resources/spiffe_role.csr");
    String csr = new String(Files.readAllBytes(path));
    X509CertRequest certReq = new X509CertRequest(csr);
    assertTrue(certReq.validateSpiffeURI("coretech", "ra", "api"));
    assertFalse(certReq.validateSpiffeURI("coretech", "ra", "backend"));
    assertFalse(certReq.validateSpiffeURI("coretech", "sa", "api"));
}