@Test
    void verifyBadResponse() throws Throwable {
        var data = MAPPER.writeValueAsString("@@@");
        try (val webServer = new MockWebServer(data)) {
            webServer.start();
            val props = new CasConfigurationProperties();
            props.getAuthn().getSurrogate().getRest().setUrl("http://localhost:%s".formatted(webServer.getPort()));
            val surrogateService = new SurrogateRestAuthenticationService(servicesManager, props, principalAccessStrategyEnforcer, applicationContext);
            val result = surrogateService.getImpersonationAccounts("cassurrogate", Optional.empty());
            assertTrue(result.isEmpty());
        }
    }
This is {@link SurrogateRestAuthenticationServiceTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-surrogate-authentication-rest/src/test/java/org/apereo/cas/authentication/surrogate/SurrogateRestAuthenticationServiceTests.java