### Question:
Options implements Serializable { List<Option> helpOptions() { return new ArrayList<Option>(shortOpts.values()); }  Options addOptionGroup(OptionGroup group); Options addOption(String opt, String description); Options addOption(String opt, boolean hasArg, String description); Options addOption(String opt, String longOpt, boolean hasArg, String description); Options addRequiredOption(String opt, String longOpt, boolean hasArg, String description); Options addOption(Option opt); Collection<Option> getOptions(); List getRequiredOptions(); Option getOption(String opt); List<String> getMatchingOptions(String opt); boolean hasOption(String opt); boolean hasLongOption(String opt); boolean hasShortOption(String opt); OptionGroup getOptionGroup(Option opt); @Override String toString();  }### Answer:
@Test public void testHelpOptions() { Option longOnly1 = OptionBuilder.withLongOpt("long-only1").create(); Option longOnly2 = OptionBuilder.withLongOpt("long-only2").create(); Option shortOnly1 = OptionBuilder.create("1"); Option shortOnly2 = OptionBuilder.create("2"); Option bothA = OptionBuilder.withLongOpt("bothA").create("a"); Option bothB = OptionBuilder.withLongOpt("bothB").create("b"); Options options = new Options(); options.addOption(longOnly1); options.addOption(longOnly2); options.addOption(shortOnly1); options.addOption(shortOnly2); options.addOption(bothA); options.addOption(bothB); Collection<Option> allOptions = new ArrayList<Option>(); allOptions.add(longOnly1); allOptions.add(longOnly2); allOptions.add(shortOnly1); allOptions.add(shortOnly2); allOptions.add(bothA); allOptions.add(bothB); Collection<Option> helpOptions = options.helpOptions(); assertTrue("Everything in all should be in help", helpOptions.containsAll(allOptions)); assertTrue("Everything in help should be in all", allOptions.containsAll(helpOptions)); }