@Test
    void verifyStrategyHandlesErrors() {
        val resource = new ClassPathResource("lppe-strategy-throws-error.groovy");
        val strategy = new GroovyPasswordPolicyHandlingStrategy<AuthenticationResponse>(resource, mock(ApplicationContext.class));
        val res = mock(AuthenticationResponse.class);
        assertThrowsWithRootCause(RuntimeException.class, AccountExpiredException.class, () -> strategy.handle(res, mock(PasswordPolicyContext.class)));
    }
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