@Test
    void verifyAllowedOperation() throws Throwable {
        val applicationContext = new StaticApplicationContext();
        applicationContext.refresh();

        try (val webServer = new MockWebServer(
            new ByteArrayResource(StringUtils.EMPTY.getBytes(StandardCharsets.UTF_8), "Output"), HttpStatus.OK)) {
            webServer.start();
            val props = new RestAuthenticationPolicyProperties();
            props.setUrl("http://localhost:%s".formatted(webServer.getPort()));
            val policy = new RestfulAuthenticationPolicy(props);
            assertTrue(policy.isSatisfiedBy(CoreAuthenticationTestUtils.getAuthentication("casuser"), applicationContext).isSuccess());
        }
    }
This is {@link RestfulAuthenticationPolicyTests}.

@author Misagh Moayyed
@since 5.2.0
core/cas-server-core-authentication/src/test/java/org/apereo/cas/authentication/policy/RestfulAuthenticationPolicyTests.java