private void makeUpgradeCluster() throws Exception {
    String clusterName = "c1";
    String hostName = "h1";
    Long hostId = 1L;

    clusters.addCluster(clusterName, repoVersion2110.getStackId());

    Cluster c = clusters.getCluster(clusterName);

    // add a host component
    clusters.addHost(hostName);
    Host host = clusters.getHost(hostName);
    Map<String, String> hostAttributes = new HashMap<>();
    hostAttributes.put("os_family", "redhat");
    hostAttributes.put("os_release_version", "6");
    host.setHostAttributes(hostAttributes);

    clusters.mapHostToCluster(hostName, clusterName);
    clusters.updateHostMappings(host);

    // !!! very important, otherwise the loops that walk the list of installed
    // service properties will not run!
    Service zk = installService(c, "ZOOKEEPER", repoVersion2110);
    addServiceComponent(c, zk, "ZOOKEEPER_SERVER");
    addServiceComponent(c, zk, "ZOOKEEPER_CLIENT");
    createNewServiceComponentHost(c, "ZOOKEEPER", "ZOOKEEPER_SERVER", hostName);
    createNewServiceComponentHost(c, "ZOOKEEPER", "ZOOKEEPER_CLIENT", hostName);

    Map<String, String> properties = new HashMap<String, String>() {
      {
        put("initLimit", "10");
      }
    };

    Config config = createConfig(c, repoVersion2110, "zoo.cfg", "version1", properties);

    c.addDesiredConfig("user", Collections.singleton(config));

    // verify that our configs are there
    String tickTime = m_configHelper.getPropertyValueFromStackDefinitions(c, "zoo.cfg", "tickTime");
    assertNotNull(tickTime);
  }
Creates a cluster using {@link #repoVersion2110} with ZooKeeper installed.

@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ConfigureActionTest.java