@Test
public void testResolve_AutoDeploy() {

  AutoDeployInfo autoDeployInfo = new AutoDeployInfo();
  autoDeployInfo.setEnabled(true);
  autoDeployInfo.setCoLocate("foo/bar");
  ComponentInfo info = new ComponentInfo();
  ComponentInfo parentInfo = new ComponentInfo();
  // parent has value set, child value is null
  parentInfo.setAutoDeploy(autoDeployInfo);
  assertEquals(autoDeployInfo, resolveComponent(info, parentInfo).getModuleInfo().getAutoDeploy());
  // child has value set, parent value is null
  info.setAutoDeploy(autoDeployInfo);
  parentInfo.setAutoDeploy(null);
  assertEquals(autoDeployInfo, resolveComponent(info, parentInfo).getModuleInfo().getAutoDeploy());
  // value set in both parent and child; child overwrites
  AutoDeployInfo autoDeployInfo2 = new AutoDeployInfo();
  info.setAutoDeploy(autoDeployInfo);
  parentInfo.setAutoDeploy(autoDeployInfo2);
  assertEquals(autoDeployInfo, resolveComponent(info, parentInfo).getModuleInfo().getAutoDeploy());
}