@Test
    void verifyNoService() {
        val applicationContext = new StaticApplicationContext();
        applicationContext.refresh();
        ApplicationContextProvider.holdApplicationContext(applicationContext);
        ApplicationContextProvider.registerBeanIntoApplicationContext(applicationContext,
            MultifactorAuthenticationPrincipalResolver.identical(), UUID.randomUUID().toString());

        val provider = TestMultifactorAuthenticationProvider.registerProviderIntoApplicationContext(applicationContext);

        val eval = new DefaultChainingMultifactorAuthenticationBypassProvider(applicationContext);
        eval.addMultifactorAuthenticationProviderBypassEvaluator(
            new RegisteredServicePrincipalAttributeMultifactorAuthenticationProviderBypassEvaluator(TestMultifactorAuthenticationProvider.ID, applicationContext));

        val principal = CoreAuthenticationTestUtils.getPrincipal(Map.of("cn", List.of("example")));
        val authentication = CoreAuthenticationTestUtils.getAuthentication(principal);
        assertTrue(eval.shouldMultifactorAuthenticationProviderExecute(authentication, null,
            provider, new MockHttpServletRequest(), CoreAuthenticationTestUtils.getService()));
    }
This is {@link RegisteredServicePrincipalAttributeMultifactorAuthenticationProviderBypassEvaluatorTests}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-authentication-mfa/src/test/java/org/apereo/cas/authentication/bypass/RegisteredServicePrincipalAttributeMultifactorAuthenticationProviderBypassEvaluatorTests.java