@Test public void testResolve_Configuration__ExcludedTypes__ParentType() throws Exception { ServiceInfo info = new ServiceInfo(); info.setExcludedConfigTypes(Collections.singleton("BAR")); Collection<PropertyInfo> fooProperties = new ArrayList<PropertyInfo>(); PropertyInfo prop1 = new PropertyInfo(); prop1.setName("name1"); prop1.setValue("val1"); fooProperties.add(prop1); PropertyInfo prop2 = new PropertyInfo(); prop2.setName("name2"); prop2.setValue("val2"); fooProperties.add(prop2); ConfigurationModule childConfigModule = createConfigurationModule("FOO", fooProperties); Collection<ConfigurationModule> childConfigModules = new ArrayList<ConfigurationModule>(); childConfigModules.add(childConfigModule); ServiceInfo parentInfo = new ServiceInfo(); Collection<PropertyInfo> barProperties = new ArrayList<PropertyInfo>(); PropertyInfo prop3 = new PropertyInfo(); prop3.setName("name1"); prop3.setValue("val3"); barProperties.add(prop3); ConfigurationModule parentConfigModule = createConfigurationModule("BAR", barProperties); Collection<ConfigurationModule> parentConfigModules = new ArrayList<ConfigurationModule>(); parentConfigModules.add(parentConfigModule); ServiceModule service = createServiceModule(info, childConfigModules); ServiceModule parentService = createServiceModule(parentInfo, parentConfigModules); resolveService(service, parentService); List<PropertyInfo> properties = service.getModuleInfo().getProperties(); assertEquals(2, properties.size()); Map<String, Map<String, Map<String, String>>> attributes = service.getModuleInfo().getConfigTypeAttributes(); assertEquals(1, attributes.size()); assertTrue(attributes.containsKey("FOO")); Map<String, Map<String, Map<String, String>>> parentAttributes = parentService.getModuleInfo().getConfigTypeAttributes(); assertEquals(1, parentAttributes.size()); assertTrue(parentAttributes.containsKey("BAR")); }
@Override public ServiceInfo getModuleInfo() { return serviceInfo; }
ServiceModule extends BaseModule<ServiceModule, ServiceInfo> implements Validable { @Override public ServiceInfo getModuleInfo() { return serviceInfo; } }
ServiceModule extends BaseModule<ServiceModule, ServiceInfo> implements Validable { @Override public ServiceInfo getModuleInfo() { return serviceInfo; } ServiceModule(StackContext stackContext, ServiceInfo serviceInfo, ServiceDirectory serviceDirectory);  ServiceModule(
      StackContext stackContext, ServiceInfo serviceInfo, ServiceDirectory serviceDirectory, boolean isCommonService); }
ServiceModule extends BaseModule<ServiceModule, ServiceInfo> implements Validable { @Override public ServiceInfo getModuleInfo() { return serviceInfo; } ServiceModule(StackContext stackContext, ServiceInfo serviceInfo, ServiceDirectory serviceDirectory);  ServiceModule(
      StackContext stackContext, ServiceInfo serviceInfo, ServiceDirectory serviceDirectory, boolean isCommonService); @Override ServiceInfo getModuleInfo(); @Override void resolve(
      ServiceModule parentModule, Map<String, StackModule> allStacks, Map<String, ServiceModule> commonServices, Map<String, ExtensionModule> extensions); void resolveExplicit(
      ServiceModule parentModule, Map<String, StackModule> allStacks, Map<String, ServiceModule> commonServices, Map<String, ExtensionModule> extensions); void resolveInternal(
      ServiceModule parentModule, Map<String, StackModule> allStacks, Map<String, ServiceModule> commonServices,
      Map<String, ExtensionModule> extensions, boolean resolveExplicit); void resolveCommonService(Map<String, StackModule> allStacks, Map<String, ServiceModule> commonServices, Map<String, ExtensionModule> extensions); @Override boolean isDeleted(); @Override String getId(); @Override void finalizeModule(); @Override boolean isValid(); @Override void setValid(boolean valid); @Override void addError(String error); @Override Collection<String> getErrors(); ServiceDirectory getServiceDirectory(); @Override void addErrors(Collection<String> errors); @Override String toString(); }
ServiceModule extends BaseModule<ServiceModule, ServiceInfo> implements Validable { @Override public ServiceInfo getModuleInfo() { return serviceInfo; } ServiceModule(StackContext stackContext, ServiceInfo serviceInfo, ServiceDirectory serviceDirectory);  ServiceModule(
      StackContext stackContext, ServiceInfo serviceInfo, ServiceDirectory serviceDirectory, boolean isCommonService); @Override ServiceInfo getModuleInfo(); @Override void resolve(
      ServiceModule parentModule, Map<String, StackModule> allStacks, Map<String, ServiceModule> commonServices, Map<String, ExtensionModule> extensions); void resolveExplicit(
      ServiceModule parentModule, Map<String, StackModule> allStacks, Map<String, ServiceModule> commonServices, Map<String, ExtensionModule> extensions); void resolveInternal(
      ServiceModule parentModule, Map<String, StackModule> allStacks, Map<String, ServiceModule> commonServices,
      Map<String, ExtensionModule> extensions, boolean resolveExplicit); void resolveCommonService(Map<String, StackModule> allStacks, Map<String, ServiceModule> commonServices, Map<String, ExtensionModule> extensions); @Override boolean isDeleted(); @Override String getId(); @Override void finalizeModule(); @Override boolean isValid(); @Override void setValid(boolean valid); @Override void addError(String error); @Override Collection<String> getErrors(); ServiceDirectory getServiceDirectory(); @Override void addErrors(Collection<String> errors); @Override String toString();  }