@Test
public void testFalconConfigClusterUpdate() 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", createExportedAddress(expectedPortNum, expectedHostGroupName));
  falconStartupProperties.put("*.falcon.service.authentication.kerberos.principal", "falcon/" + createExportedHostName(expectedHostGroupName) + "@EXAMPLE.COM");
  falconStartupProperties.put("*.falcon.http.authentication.kerberos.principal", "HTTP/" + createExportedHostName(expectedHostGroupName) + "@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("c6401.apache.ambari.org");
  hosts.add("server-two");
  TestHostGroup group1 = new TestHostGroup("host_group_1", hgComponents, hosts);
  Collection<TestHostGroup> hostGroups = new HashSet<TestHostGroup>();
  hostGroups.add(group1);
  ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
  BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
  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"));
}