@Override
    public RegisteredService findServiceById(final long id) {
        return serviceRegistries.stream()
            .map(registry -> registry.findServiceById(id))
            .filter(Objects::nonNull)
            .findFirst()
            .orElse(null);
    }
This is {@link DefaultChainingServiceRegistry}.

@author Misagh Moayyed
@since 5.3.0
core/cas-server-core-services-registry/src/main/java/org/apereo/cas/services/DefaultChainingServiceRegistry.java