@Bean
        public DuoSecurityMultifactorAuthenticationProvider duoProvider(
            @Qualifier(TenantExtractor.BEAN_NAME)
            final TenantExtractor tenantExtractor,
            final CasConfigurationProperties casProperties,
            @Qualifier("noRedirectHttpClient")
            final HttpClient httpClient) {
            val duoService = new UniversalPromptDuoSecurityAuthenticationService(
                casProperties.getAuthn().getMfa().getDuo().getFirst(), 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);
            when(bean.getDeviceManager()).thenReturn(new DuoSecurityMultifactorAuthenticationDeviceManager(bean));
            return bean;
        }
This is {@link DuoSecurityAdminApiEndpointTests}.

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