@Test public void testParseArgumentsPrintsUsageAndExitsWithHelp() throws Exception { TestSampleParams p = new TestSampleParams(); PrintStream mockPrintStream = Mockito.mock(PrintStream.class); try { p.parseArguments(new String[] {"--help"}, mockRuntime, mockPrintStream); fail("parseArguments above should have called runtime.exit(0)"); } catch (RuntimeException e) { } finally { verify(mockPrintStream, times(1)).println(anyString()); } }
public boolean parseArguments(String[] args) { return parseArguments(args, Runtime.getRuntime(), System.err); }
CodeSampleParams { public boolean parseArguments(String[] args) { return parseArguments(args, Runtime.getRuntime(), System.err); } }
CodeSampleParams { public boolean parseArguments(String[] args) { return parseArguments(args, Runtime.getRuntime(), System.err); }  }
CodeSampleParams { public boolean parseArguments(String[] args) { return parseArguments(args, Runtime.getRuntime(), System.err); }  boolean parseArguments(String[] args); }
CodeSampleParams { public boolean parseArguments(String[] args) { return parseArguments(args, Runtime.getRuntime(), System.err); }  boolean parseArguments(String[] args);  }