@Test
public void testDoNameNodeHighAvailabilityExportWithHAEnabledNameServicePropertiesIncluded() throws Exception {

  final String expectedNameService = "mynameservice";
  final String expectedHostName = "c6401.apache.ambari.org";
  Map<String, Map<String, String>> configProperties = new HashMap<String, Map<String, String>>();
  Map<String, String> coreSiteProperties = new HashMap<String, String>();
  Map<String, String> hbaseSiteProperties = new HashMap<String, String>();
  Map<String, String> accumuloSiteProperties = new HashMap<String, String>();
  configProperties.put("core-site", coreSiteProperties);
  configProperties.put("hbase-site", hbaseSiteProperties);
  configProperties.put("accumulo-site", accumuloSiteProperties);
  // configure fs.defaultFS to include a nameservice name, rather than a host name
  coreSiteProperties.put("fs.defaultFS", "hdfs://" + expectedNameService);
  // configure hbase.rootdir to include a nameservice name, rather than a host name
  hbaseSiteProperties.put("hbase.rootdir", "hdfs://" + expectedNameService + "/apps/hbase/data");
  // configure instance.volumes to include a nameservice name, rather than a host name
  accumuloSiteProperties.put("instance.volumes", "hdfs://" + expectedNameService + "/apps/accumulo/data");
  Configuration clusterConfig = new Configuration(configProperties,
      Collections.<String, Map<String, Map<String, String>>>emptyMap());
  // note: test hostgroups may not accurately reflect the required components for the config properties
  // which are mapped to them.  Only the hostgroup name is used for hostgroup resolution an the components
  // are not validated
  Collection<String> groupComponents = new HashSet<String>();
  groupComponents.add("RESOURCEMANAGER");
  Collection<String> hosts = new ArrayList<String>();
  hosts.add(expectedHostName);
  hosts.add("serverTwo");
  TestHostGroup group = new TestHostGroup("group1", groupComponents, hosts);
  Collection<TestHostGroup> hostGroups = new HashSet<TestHostGroup>();
  hostGroups.add(group);
  ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
  BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
  configProcessor.doUpdateForBlueprintExport();
  // verify that any properties that include nameservices are not removed from the exported blueprint's configuration
  assertEquals("Property containing an HA nameservice (fs.defaultFS), was not correctly exported by the processor",
      "hdfs://" + expectedNameService, coreSiteProperties.get("fs.defaultFS"));
  assertEquals("Property containing an HA nameservice (hbase.rootdir), was not correctly exported by the processor",
      "hdfs://" + expectedNameService + "/apps/hbase/data", hbaseSiteProperties.get("hbase.rootdir"));
  assertEquals("Property containing an HA nameservice (instance.volumes), was not correctly exported by the processor",
      "hdfs://" + expectedNameService + "/apps/accumulo/data", accumuloSiteProperties.get("instance.volumes"));
}