@Test
public void testExcludedPropertiesShouldBeIgnoredWhenServiceIsNotInBlueprint() throws Exception {

  reset(stack);
  // defaults from init() method that we need
  expect(stack.getName()).andReturn("testStack").anyTimes();
  expect(stack.getVersion()).andReturn("1").anyTimes();
  expect(stack.isMasterComponent((String) anyObject())).andReturn(false).anyTimes();
  // customized stack calls for this test only
  expect(stack.getExcludedConfigurationTypes("FALCON")).andReturn(Collections.singleton("oozie-site")).anyTimes();
  expect(stack.getConfigurationProperties("FALCON", "oozie-site")).andReturn(Collections.singletonMap("oozie.service.ELService.ext.functions.coord-job-submit-instances", "testValue")).anyTimes();
  expect(stack.getServiceForConfigType("oozie-site")).andReturn("OOZIE").anyTimes();
  Map<String, Map<String, String>> properties = new HashMap<String, Map<String, String>>();
  Configuration clusterConfig = new Configuration(properties, Collections.<String, Map<String, Map<String, String>>>emptyMap());
  Collection<String> hgComponents = new HashSet<String>();
  hgComponents.add("FALCON_SERVER");
  hgComponents.add("FALCON_CLIENT");
  List<String> hosts = new ArrayList<String>();
  hosts.add("c6401.apache.ambari.org");
  hosts.add("serverTwo");
  TestHostGroup group1 = new TestHostGroup("host_group_1", hgComponents, hosts);
  Collection<TestHostGroup> hostGroups = new HashSet<TestHostGroup>();
  hostGroups.add(group1);
  ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
  BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
  updater.doUpdateForClusterCreate();
  Assert.assertNull("Excluded properties shouldn't be added in this setup!", clusterConfig.getPropertyValue("oozie-site", "oozie.service.ELService.ext.functions.coord-job-submit-instances"));
}