@Test
public void testHDFSConfigClusterUpdateQuorumJournalURLSpecifyingHostNamesDirectly() 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";
  final String expectedQuorumJournalURL = "qjournal://" + createHostAddress(expectedHostNameOne, expectedPortNum) + ";" +
      createHostAddress(expectedHostNameTwo, expectedPortNum) + "/mycluster";
  Map<String, Map<String, String>> configProperties = new HashMap<String, Map<String, String>>();
  Map<String, String> hdfsSiteProperties = new HashMap<String, String>();
  configProperties.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", expectedQuorumJournalURL);
  Configuration clusterConfig = new Configuration(configProperties, Collections.<String, Map<String, Map<String, String>>>emptyMap());
  Collection<String> hgComponents = new HashSet<String>();
  hgComponents.add("NAMENODE");
  TestHostGroup group1 = new TestHostGroup(expectedHostGroupName, hgComponents, Collections.singleton("host1"));
  Collection<String> hgComponents2 = new HashSet<String>();
  hgComponents2.add("DATANODE");
  TestHostGroup group2 = new TestHostGroup(expectedHostGroupNameTwo, hgComponents2, Collections.singleton("host2"));
  Collection<TestHostGroup> hostGroups = new HashSet<TestHostGroup>();
  hostGroups.add(group1);
  hostGroups.add(group2);
  ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
  BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
  updater.doUpdateForClusterCreate();
  // expect that all servers are included in configuration property without changes, and that the qjournal URL format is preserved
  assertEquals("HDFS HA shared edits directory property should not have been modified, since FQDNs were specified.",
      expectedQuorumJournalURL,
      hdfsSiteProperties.get("dfs.namenode.shared.edits.dir"));
}