@Test
public void testGetRequiredHostGroups___validComponentCountOfZero() throws Exception {

  Map<String, Map<String, String>> properties = new HashMap<String, Map<String, String>>();
  Map<String, String> hiveSite = new HashMap<String, String>();
  properties.put("hive-site", hiveSite);
  Map<String, String> hiveEnv = new HashMap<String, String>();
  properties.put("hive-env", hiveEnv);
  hiveSite.put("javax.jdo.option.ConnectionURL", "localhost:1111");
  // not the exact string but we are only looking for "New"
  hiveEnv.put("hive_database", "New Database");
  Configuration clusterConfig = new Configuration(properties,
      Collections.<String, Map<String, Map<String, String>>>emptyMap());
  Collection<String> hgComponents1 = new HashSet<String>();
  hgComponents1.add("HIVE_SERVER");
  hgComponents1.add("NAMENODE");
  TestHostGroup group1 = new TestHostGroup("group1", hgComponents1, Collections.singleton("host1"));
  Collection<String> hgComponents2 = new HashSet<String>();
  hgComponents2.add("DATANODE");
  TestHostGroup group2 = new TestHostGroup("group2", hgComponents2, Collections.singleton("host2"));
  Collection<TestHostGroup> hostGroups = new ArrayList<TestHostGroup>();
  hostGroups.add(group1);
  hostGroups.add(group2);
  ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
  BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
  // call top-level export method
  Collection<String> requiredGroups = updater.getRequiredHostGroups();
  assertEquals(0, requiredGroups.size());
}