ArgumentParser { public String getApplicationName() { return applicationName; } ArgumentParser(String applicationName); String getApplicationName(); Option addArgument(Option option, boolean required); Option addArgument(String opt, String longOpt, boolean hasArg, String description, boolean required); Collection getConfiguredOptions(); void parseArguments(String[] args, boolean failOnMissingRequiredOptions); void parseArguments(String[] args); String getUsageInformation(); @SuppressFBWarnings(value = "UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "This is a false positive. A null check is present.") Boolean getBooleanValue(Option option); @SuppressFBWarnings(value = "UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "This is a false positive. A null check is present.") Boolean getStringValueAsBoolean(Option option, Boolean defaultValue); @SuppressFBWarnings(value = "UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "This is a false positive. A null check is present.") String getStringValue(Option option); String getStringValue(Option option, String defaultValue); Integer getIntegerValue(Option option); Integer getIntegerValue(Option option, Integer defaultValue); Integer getIntegerValue(Option option, Integer defaultValue, Integer minValue, Integer maxValue); File getFileValue(Option option); File getFileValue(Option option, File defaultValue);  }
@Test public void testGetApplicationName() { final String testApplicationName = "MY_TEST_APP"; ArgumentParser argParser = new ArgumentParser(testApplicationName); assertEquals(testApplicationName, argParser.getApplicationName()); }