@Test
    void verifyAction() throws Throwable {
        val factory = PrincipalFactoryUtils.newGroovyPrincipalFactory(new ClassPathResource("PrincipalFactory.groovy"));
        val principal = factory.createPrincipal("casuser", CollectionUtils.wrap("name", "CAS"));
        assertEquals("casuser", principal.getId());
        assertEquals(1, principal.getAttributes().size());
    }
This is {@link GroovyPrincipalFactoryTests}.

@author Misagh Moayyed
@since 5.3.0
core/cas-server-core-authentication-api/src/test/java/org/apereo/cas/authentication/GroovyPrincipalFactoryTests.java