@Test
public void testExcludedConfigTypes() {

  StackInfo stack = stackManager.getStack("HDP", "2.0.8");
  ServiceInfo service = stack.getService("HBASE");
  assertFalse(service.hasConfigType("global"));
  Map<String, Map<String, Map<String, String>>> configTypes = service.getConfigTypeAttributes();
  assertEquals(2, configTypes.size());
  assertTrue(configTypes.containsKey("hbase-site"));
  assertTrue(configTypes.containsKey("hbase-policy"));
  // test version that inherits the service via version inheritance
  stack = stackManager.getStack("HDP", "2.1.1");
  service = stack.getService("HBASE");
  assertFalse(service.hasConfigType("global"));
  configTypes = service.getConfigTypeAttributes();
  assertEquals(2, configTypes.size());
  assertTrue(configTypes.containsKey("hbase-site"));
  assertTrue(configTypes.containsKey("hbase-policy"));
  assertFalse(configTypes.containsKey("global"));
  // test version that inherits the service explicit service extension
  // the new version also excludes hbase-policy
  stack = stackManager.getStack("OTHER", "2.0");
  service = stack.getService("HBASE");
  assertFalse(service.hasConfigType("hbase-policy"));
  assertFalse(service.hasConfigType("global"));
  configTypes = service.getConfigTypeAttributes();
  assertEquals(1, configTypes.size());
  assertTrue(configTypes.containsKey("hbase-site"));
}