@Test
    void verifyOperation() throws Throwable {
        val resource = new ClassPathResource("GroovyAuthnHandler.groovy");
        val handler = new GroovyAuthenticationHandler("Test", mock(ServicesManager.class),
            PrincipalFactoryUtils.newPrincipalFactory(), resource, 0);
        assertTrue(handler.supports(CoreAuthenticationTestUtils.getCredentialsWithSameUsernameAndPassword()));
        assertTrue(handler.supports(UsernamePasswordCredential.class));
        val result = handler.authenticate(CoreAuthenticationTestUtils.getCredentialsWithSameUsernameAndPassword(), mock(Service.class));
        assertNotNull(result);
    }
This is {@link GroovyAuthenticationHandlerTests}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-generic/src/test/java/org/apereo/cas/adaptors/generic/GroovyAuthenticationHandlerTests.java