@Test
//todo: fails because there are multiple hosts mapped to the hostgroup
//todo: but error message states that the component is mapped to 0 or multiple host groups
//todo: This test fails now but passed before
public void testFalconConfigClusterUpdateDefaultConfig() throws Exception {

  final String expectedHostName = "c6401.apache.ambari.org";
  final String expectedPortNum = "808080";
  final String expectedHostGroupName = "host_group_1";
  Map<String, Map<String, String>> properties = new HashMap<String, Map<String, String>>();
  Map<String, String> falconStartupProperties = new HashMap<String, String>();
  properties.put("falcon-startup.properties", falconStartupProperties);
  // setup properties that include host information
  falconStartupProperties.put("*.broker.url", "localhost:" + expectedPortNum);
  falconStartupProperties.put("*.falcon.service.authentication.kerberos.principal", "falcon/" + "localhost" + "@EXAMPLE.COM");
  falconStartupProperties.put("*.falcon.http.authentication.kerberos.principal", "HTTP/" + "localhost" + "@EXAMPLE.COM");
  Configuration clusterConfig = new Configuration(properties, Collections.<String, Map<String, Map<String, String>>>emptyMap());
  Collection<String> hgComponents = new HashSet<String>();
  hgComponents.add("FALCON_SERVER");
  hgComponents.add("FALCON_CLIENT");
  List<String> hosts = new ArrayList<String>();
  hosts.add(expectedHostName);
  hosts.add("server-two");
  TestHostGroup group1 = new TestHostGroup(expectedHostGroupName, hgComponents, hosts);
  Collection<TestHostGroup> hostGroups = new HashSet<TestHostGroup>();
  hostGroups.add(group1);
  ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
  BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
  // call top-level export method
  updater.doUpdateForClusterCreate();
  assertEquals("Falcon Broker URL property not properly exported",
    expectedHostName + ":" + expectedPortNum, falconStartupProperties.get("*.broker.url"));
  assertEquals("Falcon Kerberos Principal property not properly exported",
    "falcon/" + expectedHostName + "@EXAMPLE.COM", falconStartupProperties.get("*.falcon.service.authentication.kerberos.principal"));
  assertEquals("Falcon Kerberos HTTP Principal property not properly exported",
    "HTTP/" + expectedHostName + "@EXAMPLE.COM", falconStartupProperties.get("*.falcon.http.authentication.kerberos.principal"));
}