@Test
    void verifyNoProviders() {
        val props = new CasConfigurationProperties();

        val appContext = new StaticApplicationContext();
        appContext.refresh();

        val trigger = new TimedMultifactorAuthenticationTrigger(props, appContext);
        val timeProps = new TimeBasedAuthenticationProperties();
        timeProps.setProviderId(TestMultifactorAuthenticationProvider.ID);
        timeProps.setOnOrAfterHour(2);
        timeProps.setOnOrBeforeHour(2);
        timeProps.setOnDays(List.of("Saturday", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday"));

        props.getAuthn().getAdaptive().getPolicy().getRequireTimedMultifactor().add(timeProps);
        assertThrows(AuthenticationException.class,
            () -> trigger.isActivated(authentication, registeredService, this.httpRequest, this.httpResponse, mock(Service.class)));
    }
This is {@link TimedMultifactorAuthenticationTriggerTests}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-authentication-mfa-api/src/test/java/org/apereo/cas/authentication/mfa/trigger/TimedMultifactorAuthenticationTriggerTests.java