@Test
public void testResolve_CommandScript() throws Exception {

  CommandScriptDefinition commandScript = new CommandScriptDefinition();
  // specified in child only
  ServiceInfo info = new ServiceInfo();
  ServiceInfo parentInfo = new ServiceInfo();
  info.setCommandScript(commandScript);
  ServiceModule service = resolveService(info, parentInfo);
  assertEquals(commandScript, service.getModuleInfo().getCommandScript());
  // specified in parent only
  info.setCommandScript(null);
  parentInfo.setCommandScript(commandScript);
  service = resolveService(info, parentInfo);
  assertEquals(commandScript, service.getModuleInfo().getCommandScript());
  // specified in both
  CommandScriptDefinition commandScript2 = new CommandScriptDefinition();
  info.setCommandScript(commandScript);
  parentInfo.setCommandScript(commandScript2);
  service = resolveService(info, parentInfo);
  assertEquals(commandScript, service.getModuleInfo().getCommandScript());
}