@Test
    void verifyOperation() throws Throwable {
        val mapper = JacksonObjectMapperFactory.builder().defaultTypingEnabled(false).build().toObjectMapper();
        val strategy = new OpenFGARegisteredServiceAccessStrategy();
        strategy.setApiUrl("http://localhost:8755");
        strategy.setRelation("reader");
        strategy.setStoreId("01GFTZWEZZMAM0NHQQZWE6AN3H");
        strategy.setToken(UUID.randomUUID().toString());
        strategy.setObject("document:Z");
        val request = RegisteredServiceAccessStrategyRequest.builder()
            .service(RegisteredServiceTestUtils.getService())
            .principalId("casuser")
            .build();
        assertFalse(strategy.authorizeRequest(request));

        val data = mapper.writeValueAsString(CollectionUtils.wrap("allowed", true));
        try (val webServer = new MockWebServer(8755,
            new ByteArrayResource(data.getBytes(StandardCharsets.UTF_8), "REST Output"), MediaType.APPLICATION_JSON_VALUE)) {
            webServer.start();
            assertTrue(strategy.authorizeRequest(request));
        }
    }
This is {@link OpenFGARegisteredServiceAccessStrategyTests}.

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