private static ConfigurableApplicationContext buildApplicationContext() {
        val applicationContext = new StaticApplicationContext();
        applicationContext.refresh();
        ApplicationContextProvider.holdApplicationContext(applicationContext);
        ApplicationContextProvider.registerBeanIntoApplicationContext(applicationContext,
            MultifactorAuthenticationPrincipalResolver.identical(), UUID.randomUUID().toString());
        return applicationContext;
    }
This is {@link DefaultMultifactorAuthenticationContextValidatorTests}.

@author Misagh Moayyed
@since 6.0.5
core/cas-server-core-authentication-mfa-api/src/test/java/org/apereo/cas/authentication/mfa/DefaultRequestedAuthenticationContextValidatorTests.java