private static UniversalPromptDuoSecurityAuthenticationService buildAuthenticationService(
        final Token token, final DuoSecurityMultifactorAuthenticationProperties duoProperties) throws DuoException {
        val duoClient = mock(Client.class);
        when(duoClient.exchangeAuthorizationCodeFor2FAResult(anyString(), anyString())).thenReturn(token);
        val client = mock(DuoSecurityClient.class);
        when(client.getInstance()).thenReturn(duoClient);
        return new UniversalPromptDuoSecurityAuthenticationService(duoProperties,
            mock(HttpClient.class), client, List.of(MultifactorAuthenticationPrincipalResolver.identical()),
            Caffeine.newBuilder().build(), mock(TenantExtractor.class));
    }
This is {@link UniversalPromptDuoSecurityAuthenticationServiceTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-duo/src/test/java/org/apereo/cas/adaptors/duo/authn/UniversalPromptDuoSecurityAuthenticationServiceTests.java