@Test
    void verifyAction() throws Throwable {
        val resolver = new GroovyAuthenticationHandlerResolver(
            new ClassPathResource("GroovyAuthenticationHandlerResolver.groovy"),
            mock(ServicesManager.class));

        val transaction = mock(AuthenticationTransaction.class);
        val creds = CoreAuthenticationTestUtils.getCredentialsWithSameUsernameAndPassword();
        when(transaction.getPrimaryCredential()).thenReturn(Optional.of(creds));

        assertTrue(resolver.supports(Set.of(new AcceptUsersAuthenticationHandler("casuser")), transaction));

        val results = resolver.resolve(Set.of(new AcceptUsersAuthenticationHandler("casuser")), transaction);
        assertFalse(results.isEmpty());
        resolver.destroy();
    }
This is {@link GroovyAuthenticationHandlerResolverTests}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-services/src/test/java/org/apereo/cas/services/GroovyAuthenticationHandlerResolverTests.java