private boolean executeStrategy(final String principal, final boolean surrogate,
                                    final GroovySurrogateRegisteredServiceAccessStrategy strategy) throws Throwable {
        val request = RegisteredServiceAccessStrategyRequest.builder().applicationContext(applicationContext).principalId(principal)
            .attributes(surrogate ? CollectionUtils.wrap(SurrogateAuthenticationService.AUTHENTICATION_ATTR_SURROGATE_ENABLED, true) : Map.of())
            .build();
        return strategy.authorizeRequest(request);
    }
This is {@link GroovySurrogateRegisteredServiceAccessStrategyTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-surrogate-api/src/test/java/org/apereo/cas/services/GroovySurrogateRegisteredServiceAccessStrategyTests.java