@Test
public void testResolve_AlertsFile() throws Exception {

  File alertsFile = new File("testAlertsFile");
  // specified in child only
  ServiceInfo info = new ServiceInfo();
  ServiceInfo parentInfo = new ServiceInfo();
  ServiceModule child = createServiceModule(info);
  ServiceModule parent = createServiceModule(parentInfo);
  // set in the module constructor from a value obtained from service directory which is mocked
  assertEquals(alertsFile, child.getModuleInfo().getAlertsFile());
  parent.getModuleInfo().setAlertsFile(null);
  resolveService(child, parent);
  assertEquals(alertsFile, child.getModuleInfo().getAlertsFile());
  // specified in parent only
  child = createServiceModule(info);
  parent = createServiceModule(parentInfo);
  parent.getModuleInfo().setAlertsFile(alertsFile);
  child.getModuleInfo().setAlertsFile(null);
  resolveService(child, parent);
  assertEquals(alertsFile, child.getModuleInfo().getAlertsFile());
  // specified in both
  child = createServiceModule(info);
  parent = createServiceModule(parentInfo);
  parent.getModuleInfo().setAlertsFile(new File("someOtherDir"));
  child.getModuleInfo().setAlertsFile(alertsFile);
  resolveService(child, parent);
  assertEquals(alertsFile, child.getModuleInfo().getAlertsFile());
}