@Test
public void testResolve_CommandScript() {

  CommandScriptDefinition commandScript = new CommandScriptDefinition();
  ComponentInfo info = new ComponentInfo();
  ComponentInfo parentInfo = new ComponentInfo();
  // parent has value set, child value is null
  parentInfo.setCommandScript(commandScript);
  assertSame(commandScript, resolveComponent(info, parentInfo).getModuleInfo().getCommandScript());
  // child has value set, parent value is null
  info.setCommandScript(commandScript);
  parentInfo.setCommandScript(null);
  assertSame(commandScript, resolveComponent(info, parentInfo).getModuleInfo().getCommandScript());
  // value set in both parent and child; child overwrites
  CommandScriptDefinition commandScript2 = createNiceMock(CommandScriptDefinition.class);
  info.setCommandScript(commandScript);
  parentInfo.setCommandScript(commandScript2);
  assertSame(commandScript, resolveComponent(info, parentInfo).getModuleInfo().getCommandScript());
}