@Test
    void verifyStrategySupportsDefault() throws Throwable {
        val resource = new ClassPathResource("lppe-strategy.groovy");
        val strategy = new GroovyPasswordPolicyHandlingStrategy<AuthenticationResponse>(resource, mock(ApplicationContext.class));
        val res = mock(AuthenticationResponse.class);
        when(res.getAuthenticationResultCode()).thenReturn(AuthenticationResultCode.INVALID_CREDENTIAL);
        when(res.isSuccess()).thenReturn(false);

        val results = strategy.handle(res, mock(PasswordPolicyContext.class));
        assertFalse(strategy.supports(null));
        assertTrue(strategy.supports(res));
        assertFalse(results.isEmpty());
    }
This is {@link GroovyPasswordPolicyHandlingStrategyTests}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-ldap-core/src/test/java/org/apereo/cas/authentication/support/GroovyPasswordPolicyHandlingStrategyTests.java