class ConfigConvergenceChecker extends AbstractComponent {

    public ServiceListResponse servicesToCheck(Application application, URI requestUrl, Duration timeoutPerService) {
        log.log(Level.FINE, () -> "Finding services to check config convergence for in '" + application);
        List<ServiceInfo> servicesToCheck = new ArrayList<>();
        application.getModel().getHosts()
                   .forEach(host -> host.getServices().stream()
                                        .filter(service -> serviceTypesToCheck.contains(service.getServiceType()))
                                        .forEach(service -> getStatePort(service).ifPresent(port -> servicesToCheck.add(service))));

        Map<ServiceInfo, Long> currentGenerations = getServiceGenerations(servicesToCheck, timeoutPerService);
        long currentGeneration = currentGenerations.values().stream().mapToLong(Long::longValue).min().orElse(-1);
        return new ServiceListResponse(200, currentGenerations, requestUrl, application.getApplicationGeneration(),
                                       currentGeneration);
    }

    @Inject public  ConfigConvergenceChecker();
    public  ConfigConvergenceChecker(StateApiFactory stateApiFactory);

}