private void validateServiceComponent(ServiceComponent serviceComponent,
                                        UpgradeCheckResult result, List<String> errorMessages) {
    Map<String, ServiceComponentHost> serviceComponentHosts = serviceComponent.getServiceComponentHosts();
    for (ServiceComponentHost serviceComponentHost : serviceComponentHosts.values()) {
      validateServiceComponentHost(serviceComponent, serviceComponentHost,
          result, errorMessages);
    }
  }
Iterates over all host components belonging to a service component and validates them.
@param serviceComponent
@param result
@param errorMessages
ambari-server/src/main/java/org/apache/ambari/server/checks/VersionMismatchCheck.java