public void testCommand() throws Exception { CommandLine getopt = new CommandLine(rp); assertEquals("[cmda, cmdb]", getopt.getCommands(new X()).keySet().toString()); getopt.execute(new X(), "cmda", Arrays.asList("-e", "help")); }