@Test
public void testBuckets() throws Exception {

  Map<String, UpgradePack> upgrades = ambariMetaInfo.getUpgradePacks("HDP", "2.1.1");
  assertTrue(upgrades.containsKey("upgrade_bucket_test"));
  UpgradePack upgrade = upgrades.get("upgrade_bucket_test");
  assertNotNull(upgrade);
  Cluster cluster = makeCluster();
  UpgradeContext context = m_upgradeContextFactory.create(cluster, UpgradeType.ROLLING,
      Direction.UPGRADE, UPGRADE_VERSION, new HashMap<String, Object>());
  context.setResolver(m_masterHostResolver);
  List<UpgradeGroupHolder> groups = m_upgradeHelper.createSequence(upgrade, context);
  assertEquals(1, groups.size());
  UpgradeGroupHolder group = groups.iterator().next();
  // Pre:
  //   Manual task = 1
  //   2x - Execute task on all 3 = 6
  // Post:
  //   Execute task on all 3 = 3
  //   2x - Manual task = 2
  //   3x - Execute task on all 3 = 9
  // Service Check = 1
  assertEquals(22, group.items.size());
}