@Test
        void verifyOperationByProvider() throws Throwable {
            var result = groovyScriptMultifactorAuthenticationTrigger.isActivated(
                CoreAuthenticationTestUtils.getAuthentication(), CoreAuthenticationTestUtils.getRegisteredService(),
                new MockHttpServletRequest(), new MockHttpServletResponse(), CoreAuthenticationTestUtils.getService());
            assertTrue(result.isPresent());

            val service = MultifactorAuthenticationTestUtils.getService("nomfa");
            result = groovyScriptMultifactorAuthenticationTrigger.isActivated(
                CoreAuthenticationTestUtils.getAuthentication(), CoreAuthenticationTestUtils.getRegisteredService(),
                new MockHttpServletRequest(), new MockHttpServletResponse(), service);
            assertFalse(result.isPresent());
        }
This is {@link GroovyScriptMultifactorAuthenticationTriggerTests}.

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