@Test
  public void testGroupOrdersForNonRolling() {
    Map<String, UpgradePack> upgrades = ambariMetaInfo.getUpgradePacks("HDP", "2.1.1");
    assertTrue(upgrades.size() > 0);
    assertTrue(upgrades.containsKey("upgrade_test_nonrolling"));
    UpgradePack upgrade = upgrades.get("upgrade_test_nonrolling");

    List<String> expected_up = Arrays.asList(
      "PRE_CLUSTER",
      "Stop High-Level Daemons",
      "Backups",
      "Stop Low-Level Daemons",
      "UPDATE_DESIRED_REPOSITORY_ID",
      "ALL_HOST_OPS",
      "ZOOKEEPER",
      "HDFS",
      "MR and YARN",
      "POST_CLUSTER");

    List<String> expected_down = Arrays.asList(
      "Restore Backups",
      "UPDATE_DESIRED_REPOSITORY_ID",
      "ALL_HOST_OPS",
      "ZOOKEEPER",
      "HDFS",
      "MR and YARN",
      "POST_CLUSTER");


    Iterator<String> itr_up = expected_up.iterator();
    List<Grouping> upgrade_groups = upgrade.getGroups(Direction.UPGRADE);
    for (Grouping g : upgrade_groups) {
      assertEquals(true, itr_up.hasNext());
      assertEquals(itr_up.next(), g.name);
    }

    Iterator<String> itr_down = expected_down.iterator();
    List<Grouping> downgrade_groups = upgrade.getGroups(Direction.DOWNGRADE);
    for (Grouping g : downgrade_groups) {
      assertEquals(true, itr_down.hasNext());
      assertEquals(itr_down.next(), g.name);
    }
  }
Tests that boolean values are property serialized in the upgrade pack.

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