@Test
        void verifyBadStatusCode() {
            val props = casProperties.getAuthn().getPac4j().getRest();
            val port = URI.create(props.getUrl()).getPort();
            try (val webServer = new MockWebServer(port, HttpStatus.EXPECTATION_FAILED)) {
                webServer.start();
                val clientsFound = delegatedIdentityProviderFactory.build();
                assertNotNull(clientsFound);
                assertTrue(clientsFound.isEmpty());
            }
        }
This is {@link RestfulDelegatedIdentityProviderFactoryTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-pac4j-webflow/src/test/java/org/apereo/cas/support/pac4j/clients/RestfulDelegatedIdentityProviderFactoryTests.java