@Test
    void verifyOperationFails() throws Throwable {
        try (val webServer = new MockWebServer(HttpStatus.FORBIDDEN)) {
            webServer.start();
            val service = RegisteredServiceTestUtils.getRegisteredService();
            val policy = new RestfulRegisteredServiceProxyPolicy();
            policy.setEndpoint("http://localhost:%s".formatted(webServer.getPort()));
            policy.setHeaders(CollectionUtils.wrap("header", "value"));
            assertFalse(policy.isAllowedProxyCallbackUrl(service, new URI("https://proxy.example.org").toURL()));
        }
    }
This is {@link RestfulRegisteredServiceProxyPolicyTests}.

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