public CommandLine getCommandLine() {
    return commandLine;
  }
@SuppressWarnings("static-access")
  @Test
  public void testCreateWithOptions() throws Exception {
    // Create new option newOpt

    Option opt = Option.builder("newOpt").argName("int")
        .hasArg()
        .desc("A new option")
        .build();
    Options opts = new Options();
    opts.addOption(opt);

    // Check newOpt is actually used to parse the args
    String[] args = new String[2];
    args[0] = "--newOpt";
    args[1] = "7";
    GenericOptionsParser g = new GenericOptionsParser(opts, args);
    assertEquals("New option was ignored",
      "7", g.getCommandLine().getOptionValues("newOpt")[0]);
  }