@Test
// merging of config dependencies is different than other non-module merges in that the collections aren't
// merged if any config dependency is specified in the child.  So, the merged result is either the child
// dependencies or if null, the parent dependencies.
public void testResolve_ConfigDependencies() {

  List<String> dependencies = new ArrayList<String>();
  String dependency1 = "one";
  String dependency2 = "two";
  dependencies.add(dependency1);
  dependencies.add(dependency2);
  ComponentInfo info = new ComponentInfo();
  ComponentInfo parentInfo = new ComponentInfo();
  // parent has value set, child value is null
  parentInfo.setConfigDependencies(dependencies);
  assertEquals(dependencies, resolveComponent(info, parentInfo).getModuleInfo().getConfigDependencies());
  // child has value set, parent value is null
  info.setConfigDependencies(dependencies);
  parentInfo.setConfigDependencies(null);
  assertEquals(dependencies, resolveComponent(info, parentInfo).getModuleInfo().getConfigDependencies());
  // value set in both parent and child; merge parent and child
  List<String> dependencies2 = new ArrayList<String>();
  String dependency3 = "two";
  String dependency4 = "four";
  dependencies2.add(dependency3);
  dependencies2.add(dependency4);
  info.setConfigDependencies(dependencies2);
  parentInfo.setConfigDependencies(dependencies);
  List<String> resolvedDependencies = resolveComponent(info, parentInfo).getModuleInfo().getConfigDependencies();
  assertEquals(2, resolvedDependencies.size());
  assertTrue(resolvedDependencies.contains(dependency3));
  assertTrue(resolvedDependencies.contains(dependency4));
}