@Test
    void verifyInlineGroovyFile() {
        val ticket = mock(AuthenticationAwareTicket.class);
        when(ticket.getAuthentication()).thenReturn(CoreAuthenticationTestUtils.getAuthentication("Frodo"));
        val results = new GroovyRegisteredServiceSingleSignOnParticipationPolicy();
        results.setGroovyScript("groovy { authentication.principal.id == 'Frodo' }");
        assertTrue(results.shouldParticipateInSso(CoreAuthenticationTestUtils.getRegisteredService(), ticket));
    }
This is {@link GroovyRegisteredServiceSingleSignOnParticipationPolicyTests}.

@author Misagh Moayyed
@since 7.1.0
core/cas-server-core-services-api/src/test/java/org/apereo/cas/services/GroovyRegisteredServiceSingleSignOnParticipationPolicyTests.java