### Question:
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);  }### Answer:
@Test public void testSuccessfulNoOptionsJCommanderBuild() { String testPropertiesFile = "/test/properties/file"; MultiLangDaemon.MultiLangDaemonArguments arguments = new MultiLangDaemon.MultiLangDaemonArguments(); daemon.buildJCommanderAndParseArgs(arguments, new String[] { testPropertiesFile }); assertThat(arguments.propertiesFile, nullValue()); assertThat(arguments.logConfiguration, nullValue()); assertThat(arguments.parameters.size(), equalTo(1)); assertThat(arguments.parameters.get(0), equalTo(testPropertiesFile)); }
@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)); }
@Test public void testEmptyArgsJCommanderBuild() { MultiLangDaemon.MultiLangDaemonArguments arguments = new MultiLangDaemon.MultiLangDaemonArguments(); String[] args = new String[] {}; daemon.buildJCommanderAndParseArgs(arguments, args); assertThat(arguments.propertiesFile, nullValue()); assertThat(arguments.logConfiguration, nullValue()); assertThat(arguments.parameters, empty()); }