@Test
    void verifyAction() throws Throwable {
        val processor = new GroovyAuthenticationPostProcessor(new ClassPathResource("GroovyPostProcessor.groovy"));
        val transaction = mock(AuthenticationTransaction.class);
        val creds = CoreAuthenticationTestUtils.getCredentialsWithSameUsernameAndPassword();
        when(transaction.getPrimaryCredential()).thenReturn(Optional.of(creds));
        assertTrue(processor.supports(creds));
        val authenticationBuilder = CoreAuthenticationTestUtils.getAuthenticationBuilder();
        processor.process(authenticationBuilder, transaction);
        val successes = authenticationBuilder.getSuccesses();
        assertFalse(successes.isEmpty());
        assertFalse(successes.get("SimpleTestUsernamePasswordAuthenticationHandler").getWarnings().isEmpty());
        processor.destroy();
    }
This is {@link GroovyAuthenticationPostProcessorTests}.

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