private List<StageWrapper> buildServiceChecks(UpgradeContext upgradeContext, List<String> serviceChecks) {
      if (CollectionUtils.isEmpty(serviceChecks)) {
        return Collections.emptyList();
      }

      List<StageWrapper> wrappers = new ArrayList<>();

      Cluster cluster = upgradeContext.getCluster();

      for (String serviceName : serviceChecks) {
        boolean hasService = false;
        try {
          cluster.getService(serviceName);
          hasService = true;
        } catch (Exception e) {
          LOG.warn("Service {} not found to orchestrate", serviceName);
        }

        if (!hasService) {
          continue;
        }

        StageWrapper wrapper = new StageWrapper(StageWrapper.Type.SERVICE_CHECK,
            String.format("Service Check %s", upgradeContext.getServiceDisplay(serviceName)),
            new TaskWrapper(serviceName, "", Collections.emptySet(), new ServiceCheckTask()));

        wrappers.add(wrapper);
      }

      return wrappers;
    }
@param upgradeContext  the context
@return  the wrappers for a host
ambari-server/src/main/java/org/apache/ambari/server/stack/upgrade/HostOrderGrouping.java