@Test
  public void testPackWithHostGroup() {
    Map<String, UpgradePack> upgrades = ambariMetaInfo.getUpgradePacks("HDP", "2.2.0");
    UpgradePack upgradePack = upgrades.get("upgrade_test_host_ordered");

    assertNotNull(upgradePack);
    assertEquals(upgradePack.getType(), UpgradeType.HOST_ORDERED);
    assertEquals(3, upgradePack.getAllGroups().size());

    assertEquals(HostOrderGrouping.class, upgradePack.getAllGroups().get(0).getClass());
    assertEquals(Grouping.class, upgradePack.getAllGroups().get(1).getClass());
  }
Tests that the service level XML merges correctly for 2.0.5/HDFS/HDP/2.2.0.

@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/state/stack/UpgradePackTest.java