@Test public void testInvalidArgument() throws ParseException { when(parser.parse(any(String.class))).thenThrow(new ParseException("Invalid argument")); EcLog.getToolOptions(new String[]{ "--wrong" }, parser, exiter); verify(parser).printUsage(); verify(exiter).accept(eq(1)); }
private static ToolOptions getToolOptions(String... argv) { return getToolOptions(argv, new OptionParser(), System::exit); }
EcLog { private static ToolOptions getToolOptions(String... argv) { return getToolOptions(argv, new OptionParser(), System::exit); } }
EcLog { private static ToolOptions getToolOptions(String... argv) { return getToolOptions(argv, new OptionParser(), System::exit); } private  EcLog(); }
EcLog { private static ToolOptions getToolOptions(String... argv) { return getToolOptions(argv, new OptionParser(), System::exit); } private  EcLog(); static void main(String[] argv); }
EcLog { private static ToolOptions getToolOptions(String... argv) { return getToolOptions(argv, new OptionParser(), System::exit); } private  EcLog(); static void main(String[] argv);  }