@Test
  public void testDoUpdateForClusterCreate_HostgroupReplacement_DefaultUpdater() throws Exception {
    Map<String, Map<String, String>> stackProperties = new HashMap<>(ImmutableMap.of(
      "hdfs-site", new HashMap<>(ImmutableMap.of(
        "dfs.http.address", "testhost2")),
      "myservice-env", new HashMap<>(ImmutableMap.of(
          "myservice_master_address", "%HOSTGROUP::group1%:8080",
          "myservice_some_other_property", "some_value"))));

    Map<String, Map<String, String>> hostGroupProperties = new HashMap<>(ImmutableMap.of(
      "hdfs-site", new HashMap<>(ImmutableMap.of(
        "dfs.https.address", "testhost3")),
      "myservice-site", new HashMap<>(ImmutableMap.of(
        "myservice_slave_address", "%HOSTGROUP::group1%:8080"))));
    hostGroupProperties.get("hdfs-site").put("null_property", null);

    Configuration clusterConfig = new Configuration(new HashMap<>(), new HashMap<>());
    clusterConfig.setParentConfiguration(new Configuration(stackProperties, emptyMap()));
    Configuration hostGroupConfig = new Configuration(hostGroupProperties, emptyMap());

    TestHostGroup group1 = new TestHostGroup("group1",
      Sets.newHashSet("NAMENODE", "SECONDARY_NAMENODE", "RESOURCEMANAGER"),
      Collections.singleton("testhost"),
      hostGroupConfig);

    Collection<TestHostGroup> hostGroups = Sets.newHashSet(group1);

    ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);

    Set<String> configTypesUpdated =
      updater.doUpdateForClusterCreate();

    assertTrue(configTypesUpdated.containsAll(ImmutableList.of("myservice-env", "myservice-site")));
    // updater called on dfs.http.address and dfs.http.address but didn't change their values
    assertTrue(!configTypesUpdated.contains("hdfs-site"));
    Map<String, String> clusterHdfsSite = clusterConfig.getProperties().get("hdfs-site");
    // the value of dfs.http.address didn't change, yet it was added to the cluster config as this property has a
    // registered updater
    assertTrue(clusterHdfsSite.containsKey("dfs.http.address"));
    Map<String, String> myserviceEnv = clusterConfig.getProperties().get("myservice-env");
    // default updater (to replace %HOSTGROUP::name%) was called on myservice_master_address and myservice_some_other_property
    // - myservice_master_address was added to the cluster config as its value was updated by the default updater
    // - the value of myservice_some_other_property didn't change and this property does not have a registered updater,
    //   so it wasn't added to the cluster config
    assertEquals(ImmutableMap.of("myservice_master_address", "testhost:8080"), myserviceEnv);

    // %HOSTGROUP::name% has been replaced by the default updater in hostgroup config
    Map<String, String> myserviceSite = hostGroupConfig.getProperties().get("myservice-site");
    assertEquals(myserviceSite, ImmutableMap.of("myservice_slave_address", "testhost:8080"));
  }
There is no support currently for deploying a fully Kerberized
cluster with Blueprints.  This test verifies the current treatment
of Kerberos-related properties in a Blueprint export.

@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java