@BeforeEach
    void setup(final TestInfo info) {
        if (!info.getTags().contains("DisableProviderRegistration")) {
            this.multifactorAuthenticationProvider = TestMultifactorAuthenticationProvider.registerProviderIntoApplicationContext(applicationContext);
        }

        this.authentication = mock(Authentication.class);
        val principal = mock(Principal.class);
        when(principal.getId()).thenReturn("casuser");
        when(principal.getAttributes()).thenReturn(Map.of("email", List.of("casuser@example.org")));
        when(authentication.getAttributes()).thenReturn(Map.of("category", List.of("user-object"), "mfa-mode", List.of("mfa-other")));
        when(authentication.getPrincipal()).thenReturn(principal);

        this.registeredService = mock(RegisteredService.class);
        when(registeredService.getName()).thenReturn("Service");
        when(registeredService.getServiceId()).thenReturn("http://app.org");
        when(registeredService.getId()).thenReturn(1000L);

        this.geoLocationService = mock(GeoLocationService.class);

        this.httpRequest = new MockHttpServletRequest();
        this.httpRequest.setRemoteAddr("185.86.151.11");
        this.httpRequest.setLocalAddr("185.88.151.12");
        this.httpRequest.addHeader(HttpHeaders.USER_AGENT, "Mozilla/5.0 (Windows NT 10.0; WOW64)");
        var clientInfo = ClientInfo.from(this.httpRequest);
        ClientInfoHolder.setClientInfo(clientInfo);

        this.httpResponse = new MockHttpServletResponse();
    }
This is {@link BaseMultifactorAuthenticationTriggerTests}.

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