private Service installService(Cluster cluster, String serviceName, RepositoryVersionEntity repositoryVersion) throws AmbariException {
    Service service = serviceFactory.createNew(cluster, serviceName, repositoryVersion);
    cluster.addService(service);
    return service;
  }
Creates a new {@link HostVersionEntity} instance in the
{@link RepositoryVersionState#INSTALLED} for the specified host.

@param hostName
@param repositoryVersion
@throws AmbariException
ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ComponentVersionCheckActionTest.java