private void installRepositoryOnHost(String hostName, RepositoryVersionEntity repositoryVersion)
      throws AmbariException {
    // Start upgrading the newer repo
    HostDAO hostDAO = m_injector.getInstance(HostDAO.class);

    HostVersionEntity entity = new HostVersionEntity();
    entity.setHostEntity(hostDAO.findByName(hostName));
    entity.setRepositoryVersion(repositoryVersion);
    entity.setState(RepositoryVersionState.INSTALLED);
    hostVersionDAO.create(entity);
  }
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