protected AssertionConsumerService getSPAssertionConsumerService(
        final SPSSODescriptor spssoDescriptor,
        final Collection<AssertionConsumerService> services) {

        // Get default
        if (spssoDescriptor.getDefaultAssertionConsumerService() != null) {
            return spssoDescriptor.getDefaultAssertionConsumerService();
        }

        // Get first
        if (!services.isEmpty()) {
            return services.iterator().next();
        }

        throw new SAMLException("No assertion consumer services could be found for " + spssoDescriptor);
    }
<p>getSPAssertionConsumerService.</p>

@param spssoDescriptor a {@link SPSSODescriptor} object
@param services a {@link List} object
@return a {@link AssertionConsumerService} object
pac4j-saml/src/main/java/org/pac4j/saml/context/SAML2MessageContext.java