@Override
    public Service resolveService(final Service service) throws Throwable {
        val strategy = this.strategies
            .stream()
            .filter(selectionStrategy -> selectionStrategy.supports(service))
            .findFirst();

        if (strategy.isPresent()) {
            val result = strategy.get();
            return result.resolveServiceFrom(service);
        }
        return null;
    }
This is {@link DefaultAuthenticationServiceSelectionPlan}.

@author Misagh Moayyed
@since 5.1.0
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/DefaultAuthenticationServiceSelectionPlan.java