@Test
    void verifyOperation() throws Throwable {
        val strategy = new PermifyRegisteredServiceAccessStrategy();
        strategy.setSubjectRelation("reader");
        strategy.setTenantId("123456");
        strategy.setPermission("view");
        strategy.setToken(UUID.randomUUID().toString());

        val request = RegisteredServiceAccessStrategyRequest.builder()
            .service(RegisteredServiceTestUtils.getService())
            .principalId("casuser")
            .registeredService(RegisteredServiceTestUtils.getRegisteredService())
            .attributes(CoreAuthenticationTestUtils.getAttributes())
            .build();
        try (val webServer = new MockWebServer(Map.of("can", "CHECK_RESULT_ALLOWED"))) {
            webServer.start();
            strategy.setApiUrl("http://localhost:%s".formatted(webServer.getPort()));
            assertTrue(strategy.authorizeRequest(request));
        }
    }
This is {@link PermifyRegisteredServiceAccessStrategyTests}.

@author Misagh Moayyed
@since 7.2.0
core/cas-server-core-services/src/test/java/org/apereo/cas/services/PermifyRegisteredServiceAccessStrategyTests.java