@Test public void testSuccessfulOptionsJCommanderBuild() { String propertiesOption = "/test/properties/file/option"; String propertiesFileArgs = "/test/properties/args"; String[] args = new String[] { "-p", propertiesOption, propertiesFileArgs }; MultiLangDaemon.MultiLangDaemonArguments arguments = new MultiLangDaemon.MultiLangDaemonArguments(); daemon.buildJCommanderAndParseArgs(arguments, args); assertThat(arguments.propertiesFile, equalTo(propertiesOption)); assertThat(arguments.logConfiguration, nullValue()); assertThat(arguments.parameters.size(), equalTo(1)); assertThat(arguments.parameters.get(0), equalTo(propertiesFileArgs)); }
JCommander buildJCommanderAndParseArgs(final MultiLangDaemonArguments arguments, final String[] args) { JCommander jCommander = JCommander.newBuilder().programName("amazon-kinesis-client MultiLangDaemon") .addObject(arguments) .build(); jCommander.parse(args); return jCommander; }
MultiLangDaemon { JCommander buildJCommanderAndParseArgs(final MultiLangDaemonArguments arguments, final String[] args) { JCommander jCommander = JCommander.newBuilder().programName("amazon-kinesis-client MultiLangDaemon") .addObject(arguments) .build(); jCommander.parse(args); return jCommander; } }
MultiLangDaemon { JCommander buildJCommanderAndParseArgs(final MultiLangDaemonArguments arguments, final String[] args) { JCommander jCommander = JCommander.newBuilder().programName("amazon-kinesis-client MultiLangDaemon") .addObject(arguments) .build(); jCommander.parse(args); return jCommander; }  }
MultiLangDaemon { JCommander buildJCommanderAndParseArgs(final MultiLangDaemonArguments arguments, final String[] args) { JCommander jCommander = JCommander.newBuilder().programName("amazon-kinesis-client MultiLangDaemon") .addObject(arguments) .build(); jCommander.parse(args); return jCommander; }  static void main(final String[] args); }
MultiLangDaemon { JCommander buildJCommanderAndParseArgs(final MultiLangDaemonArguments arguments, final String[] args) { JCommander jCommander = JCommander.newBuilder().programName("amazon-kinesis-client MultiLangDaemon") .addObject(arguments) .build(); jCommander.parse(args); return jCommander; }  static void main(final String[] args);  }