@Test
public void testHDFSConfigClusterUpdateQuorumJournalURL() throws Exception {

  final String expectedHostNameOne = "c6401.apache.ambari.org";
  final String expectedHostNameTwo = "c6402.apache.ambari.org";
  final String expectedPortNum = "808080";
  final String expectedHostGroupName = "host_group_1";
  final String expectedHostGroupNameTwo = "host_group_2";
  Map<String, Map<String, String>> properties = new HashMap<String, Map<String, String>>();
  Map<String, String> hdfsSiteProperties = new HashMap<String, String>();
  properties.put("hdfs-site", hdfsSiteProperties);
  // setup properties that include host information
  // setup shared edit property, that includes a qjournal URL scheme
  hdfsSiteProperties.put("dfs.namenode.shared.edits.dir", "qjournal://" + createExportedAddress(expectedPortNum, expectedHostGroupName) + ";" + createExportedAddress(expectedPortNum, expectedHostGroupNameTwo) + "/mycluster");
  Configuration clusterConfig = new Configuration(properties, Collections.<String, Map<String, Map<String, String>>>emptyMap());
  Collection<String> hgComponents1 = new HashSet<String>();
  hgComponents1.add("NAMENODE");
  TestHostGroup group1 = new TestHostGroup(expectedHostGroupName, hgComponents1, Collections.singleton(expectedHostNameOne));
  Collection<String> hgComponents2 = new HashSet<String>();
  hgComponents2.add("NAMENODE");
  TestHostGroup group2 = new TestHostGroup(expectedHostGroupNameTwo, hgComponents2, Collections.singleton(expectedHostNameTwo));
  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
  updater.doUpdateForClusterCreate();
  // expect that all servers are included in the updated config, and that the qjournal URL format is preserved
  assertEquals("HDFS HA shared edits directory property not properly updated for cluster create.",
    "qjournal://" + createHostAddress(expectedHostNameOne, expectedPortNum) + ";" + createHostAddress(expectedHostNameTwo, expectedPortNum) + "/mycluster",
    hdfsSiteProperties.get("dfs.namenode.shared.edits.dir"));
}