@Test public void handleOptions() throws ParseException { CommandLine commandLine = Normalizer.parseOptions(new String[]{"-h"}); assertThat(commandLine.hasOption("h"), is(true)); commandLine = Normalizer.parseOptions(new String[]{"--help"}); assertThat(commandLine.hasOption("h"), is(true)); commandLine = Normalizer.parseOptions(new String[]{"--skipImport"}); assertThat(commandLine.hasOption("-skipImport"), is(true)); assertThat(commandLine.hasOption("skipImport"), is(true)); commandLine = Normalizer.parseOptions(new String[]{"-skipImport", "--skipExport"}); assertThat(commandLine.hasOption("-skipImport"), is(true)); assertThat(commandLine.hasOption("skipImport"), is(true)); assertThat(commandLine.hasOption("skipExport"), is(true)); assertThat(commandLine.hasOption("skipLink"), is(false)); commandLine = Normalizer.parseOptions(new String[]{"-skipLink", "--skipExport"}); assertThat(commandLine.hasOption("skipLink"), is(true)); commandLine = Normalizer.parseOptions(new String[]{"-datasetDir", "some/bla"}); assertThat(commandLine.getOptionValue("datasetDir"), is("some/bla")); }
protected static CommandLine parseOptions(String[] args) throws ParseException { CommandLineParser parser = new BasicParser(); return parser.parse(getOptions(), args); }
Normalizer { protected static CommandLine parseOptions(String[] args) throws ParseException { CommandLineParser parser = new BasicParser(); return parser.parse(getOptions(), args); } }
Normalizer { protected static CommandLine parseOptions(String[] args) throws ParseException { CommandLineParser parser = new BasicParser(); return parser.parse(getOptions(), args); }  }
Normalizer { protected static CommandLine parseOptions(String[] args) throws ParseException { CommandLineParser parser = new BasicParser(); return parser.parse(getOptions(), args); }  static void main(final String[] args); void run(CommandLine cmdLine); }
Normalizer { protected static CommandLine parseOptions(String[] args) throws ParseException { CommandLineParser parser = new BasicParser(); return parser.parse(getOptions(), args); }  static void main(final String[] args); void run(CommandLine cmdLine);  }