@Test
public void testDefaultUserAndGroupProxyPropertiesSetWhenNotProvided2() throws Exception {

  Map<String, Map<String, String>> properties = new HashMap<String, Map<String, String>>();
  Map<String, String> falconEnvProperties = new HashMap<String, String>();
  properties.put("falcon-env", falconEnvProperties);
  falconEnvProperties.put("falcon_user", "test-falcon-user");
  Map<String, Map<String, String>> parentProperties = new HashMap<String, Map<String, String>>();
  Map<String, String> oozieEnvProperties = new HashMap<String, String>();
  parentProperties.put("oozie-env", oozieEnvProperties);
  oozieEnvProperties.put("oozie_user", "test-oozie-user");
  Map<String, String> coreSiteProperties = new HashMap<String, String>();
  parentProperties.put("core-site", coreSiteProperties);
  coreSiteProperties.put("hadoop.proxyuser.test-oozie-user.hosts", "testOozieHostsVal");
  Configuration parentClusterConfig = new Configuration(parentProperties,
      Collections.<String, Map<String, Map<String, String>>>emptyMap());
  Configuration clusterConfig = new Configuration(properties,
      Collections.<String, Map<String, Map<String, String>>>emptyMap(), parentClusterConfig);
  Collection<String> hgComponents1 = new HashSet<String>();
  hgComponents1.add("OOZIE_SERVER");
  hgComponents1.add("FALCON_SERVER");
  TestHostGroup group1 = new TestHostGroup("group1", hgComponents1, Collections.singleton("host1"));
  Collection<TestHostGroup> hostGroups = Collections.singletonList(group1);
  ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
  BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
  configProcessor.doUpdateForClusterCreate();
  Map<String, String> leafConfigCoreSiteProps = properties.get("core-site");
  // because "hadoop.proxyuser.test-oozie-user.hosts" is provided in the parent config, it shouldn't be added
  assertEquals(3, leafConfigCoreSiteProps.size());
  // ensure that explicitly set value is unchanged
  assertEquals("testOozieHostsVal", clusterConfig.getPropertyValue("core-site", "hadoop.proxyuser.test-oozie-user.hosts"));
  assertEquals("*", leafConfigCoreSiteProps.get("hadoop.proxyuser.test-oozie-user.groups"));
  assertEquals("*", leafConfigCoreSiteProps.get("hadoop.proxyuser.test-falcon-user.hosts"));
  assertEquals("*", leafConfigCoreSiteProps.get("hadoop.proxyuser.test-falcon-user.groups"));
}