private Service addService(Cluster cluster, String serviceName) throws AmbariException {
    RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(cluster);
    return cluster.addService(serviceName, repositoryVersion);
  }
Adds the service to the cluster using the current cluster version as the
repository version for the service.

@param cluster
         the cluster.
@param serviceName
         the service name.
@return the newly added service.
@throws AmbariException
ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java