@Test
public void testResolve_Dependencies() {

  List<DependencyInfo> dependencies = new ArrayList<DependencyInfo>();
  DependencyInfo dependency1 = new DependencyInfo();
  dependency1.setName("service/one");
  DependencyInfo dependency2 = new DependencyInfo();
  dependency2.setName("service/two");
  dependencies.add(dependency1);
  dependencies.add(dependency2);
  ComponentInfo info = new ComponentInfo();
  ComponentInfo parentInfo = new ComponentInfo();
  // parent has value set, child value is null
  parentInfo.setDependencies(dependencies);
  assertEquals(dependencies, resolveComponent(info, parentInfo).getModuleInfo().getDependencies());
  // child has value set, parent value is null
  info.setDependencies(dependencies);
  parentInfo.setDependencies(null);
  assertEquals(dependencies, resolveComponent(info, parentInfo).getModuleInfo().getDependencies());
  // value set in both parent and child; merge parent and child
  //todo: currently there is no way to remove an inherited dependency
  List<DependencyInfo> dependencies2 = new ArrayList<DependencyInfo>();
  DependencyInfo dependency3 = new DependencyInfo();
  dependency3.setName("service/two");
  DependencyInfo dependency4 = new DependencyInfo();
  dependency4.setName("service/four");
  dependencies2.add(dependency3);
  dependencies2.add(dependency4);
  info.setDependencies(dependencies2);
  parentInfo.setDependencies(dependencies);
  List<DependencyInfo> resolvedDependencies = resolveComponent(info, parentInfo).getModuleInfo().getDependencies();
  assertEquals(3, resolvedDependencies.size());
  assertTrue(resolvedDependencies.contains(dependency1));
  assertTrue(resolvedDependencies.contains(dependency3));
  assertTrue(resolvedDependencies.contains(dependency4));
}