@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) {
    // This is expected, succeed.
  } finally {
    verify(mockPrintStream, times(1)).println(anyString());
  }
}