@Bean
        public DuoSecurityAdminApiService duoSecurityAdminApiService(
            @Qualifier(TenantExtractor.BEAN_NAME)
            final TenantExtractor tenantExtractor,
            @Qualifier("noRedirectHttpClient") final HttpClient httpClient,
            final CasConfigurationProperties casProperties) {

            val duoProps = casProperties.getAuthn().getMfa().getDuo().getFirst();
            val service = new DefaultDuoSecurityAdminApiService(httpClient, duoProps);
            val duoService = new UniversalPromptDuoSecurityAuthenticationService(duoProps, httpClient,
                mock(DuoSecurityClient.class), List.of(), Caffeine.newBuilder().build(), tenantExtractor);
            val bean = mock(DuoSecurityMultifactorAuthenticationProvider.class);
            when(bean.getId()).thenReturn(DuoSecurityMultifactorAuthenticationProperties.DEFAULT_IDENTIFIER);
            when(bean.getDuoAuthenticationService()).thenReturn(duoService);
            when(bean.matches(eq(DuoSecurityMultifactorAuthenticationProperties.DEFAULT_IDENTIFIER))).thenReturn(true);
            return service;
        }
This is {@link DefaultDuoSecurityAdminApiServiceTests}.

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