### Question:
CommandLine { private void helpBrownout(String[] args, Options options) { if (args.length == 0) return; if (args[0].equals("--help") || args[0].equals("-h")) { Option state = null; try { if (args.length == 2) { if (args[1].startsWith("--")) { state = options.findByLongOption(args[1]); } else if (args[1].startsWith("-")) { state = options.findByShortOption(args[1]); } } } catch (InvalidOptionException e) { throw new ParseException("Cannot provide help on option " + args[1] + ". Invalid argument."); } throwHelp(state); } } CommandLine(String motd); OptionBuilder newOption(); Options parse(String[] args); void throwHelp(Option state);  }### Answer:
@Test public void testHelpBrownout() throws Exception { expect.expect(CommandLine.ParseHelpfulException.class); commandLine.parse(new String[]{"--help"}); }