@Test
    void verifyDirectAuthnUnknownEndpoint() throws Throwable {
        val payload = Map.of(DuoSecurityAuthenticationService.RESULT_KEY_RESPONSE,
            Map.of(DuoSecurityAuthenticationService.RESULT_KEY_RESULT, "allow"), DuoSecurityAuthenticationService.RESULT_KEY_STAT, "OK");
        try (val webServer = new MockWebServer(true, MAPPER.writeValueAsString(payload))) {
            webServer.start();
            val service = getAuthenticationService(webServer.getPort());
            service.getProperties().setDuoApiHost("httpbin.org/anything/sample1");
            val token = new DuoSecurityDirectCredential(RegisteredServiceTestUtils.getPrincipal(), "mfa-duo");
            val results = service.authenticate(token);
            assertFalse(results.isSuccess());
        }
    }
This is {@link DuoSecurityAuthenticationServiceTests}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-duo-core/src/test/java/org/apereo/cas/adaptors/duo/authn/DuoSecurityAuthenticationServiceTests.java