AdvancedCmdLineOption printHelloWorldOption = (AdvancedCmdLineOption) getOptionByName(
"printHelloWorld", options);
printHelloWorldOption.getHandler().handleOption(printHelloWorldAction,
createOptionInstance(printHelloWorldOption));
ActionMessagePrinter printer = new ActionMessagePrinter();
printHelloWorldAction.execute(printer);
assertEquals(1, printer.getPrintedMessages().size());
assertEquals("Hello World!", printer.getPrintedMessages().get(0));
}
}