test_class.declarator: environmentVariables = new EnvironmentVariables()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public EnvironmentVariables environmentVariables = new EnvironmentVariables();
test_class.type: EnvironmentVariables
test_class.var_name: environmentVariables
test_class.declarator: retentionExpirationExporterApp = new RetentionExpirationExporterApp()
      {
          protected ApplicationContext createApplicationContext()
          {
              return applicationContext;
          }
      }
test_class.modifier: private
test_class.original_string: private RetentionExpirationExporterApp retentionExpirationExporterApp = new RetentionExpirationExporterApp()
      {
          protected ApplicationContext createApplicationContext()
          {
              return applicationContext;
          }
      };
test_class.type: RetentionExpirationExporterApp
test_class.var_name: retentionExpirationExporterApp
test_class.file: herd-code/herd-tools/herd-retention-expiration-exporter/src/test/java/org/finra/herd/tools/retention/exporter/RetentionExpirationExporterAppTest.java
test_class.identifier: RetentionExpirationExporterAppTest
test_class.superclass: extends AbstractExporterTest
test_case.body: @Test
      public void testParseCommandLineArgumentsVersionOpt()
      {
          String output = runTestGetSystemOut(() -> {
              String[] arguments = {"--version"};
              assertEquals(ToolsCommonConstants.ReturnValue.SUCCESS, retentionExpirationExporterApp.parseCommandLineArguments(arguments, applicationContext));
          });
  
          BuildInformation buildInformation = applicationContext.getBean(BuildInformation.class);
  
          assertEquals("output", String
              .format(DataBridgeApp.BUILD_INFO_STRING_FORMAT, buildInformation.getBuildDate(), buildInformation.getBuildNumber(), buildInformation.getBuildOs(),
                  buildInformation.getBuildUser()), output);
      }
test_case.class_method_signature: RetentionExpirationExporterAppTest.testParseCommandLineArgumentsVersionOpt()
test_case.full_signature: @Test public void testParseCommandLineArgumentsVersionOpt()
test_case.identifier: testParseCommandLineArgumentsVersionOpt
test_case.invocations: runTestGetSystemOut assertEquals parseCommandLineArguments getBean assertEquals format getBuildDate getBuildNumber getBuildOs getBuildUser
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testParseCommandLineArgumentsVersionOpt()
focal_class.declarator: APPLICATION_NAME = "herd-retention-expiration-exporter-app"
focal_class.modifier: static final
focal_class.original_string: static final String APPLICATION_NAME = "herd-retention-expiration-exporter-app";
focal_class.type: String
focal_class.var_name: APPLICATION_NAME
focal_class.declarator: LOGGER = LoggerFactory.getLogger(RetentionExpirationExporterApp.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(RetentionExpirationExporterApp.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: argParser
focal_class.modifier: private
focal_class.original_string: private ArgumentParser argParser;
focal_class.type: ArgumentParser
focal_class.var_name: argParser
focal_class.declarator: businessObjectDefinitionNameOpt
focal_class.modifier: private
focal_class.original_string: private Option businessObjectDefinitionNameOpt;
focal_class.type: Option
focal_class.var_name: businessObjectDefinitionNameOpt
focal_class.declarator: disableHostnameVerification
focal_class.modifier: private
focal_class.original_string: private Boolean disableHostnameVerification;
focal_class.type: Boolean
focal_class.var_name: disableHostnameVerification
focal_class.declarator: disableHostnameVerificationOpt
focal_class.modifier: private
focal_class.original_string: private Option disableHostnameVerificationOpt;
focal_class.type: Option
focal_class.var_name: disableHostnameVerificationOpt
focal_class.declarator: localOutputFileOpt
focal_class.modifier: private
focal_class.original_string: private Option localOutputFileOpt;
focal_class.type: Option
focal_class.var_name: localOutputFileOpt
focal_class.declarator: namespaceOpt
focal_class.modifier: private
focal_class.original_string: private Option namespaceOpt;
focal_class.type: Option
focal_class.var_name: namespaceOpt
focal_class.declarator: passwordOpt
focal_class.modifier: private
focal_class.original_string: private Option passwordOpt;
focal_class.type: Option
focal_class.var_name: passwordOpt
focal_class.declarator: enableEnvVariablesOpt
focal_class.modifier: private
focal_class.original_string: private Option enableEnvVariablesOpt;
focal_class.type: Option
focal_class.var_name: enableEnvVariablesOpt
focal_class.declarator: regServerHostOpt
focal_class.modifier: private
focal_class.original_string: private Option regServerHostOpt;
focal_class.type: Option
focal_class.var_name: regServerHostOpt
focal_class.declarator: regServerPort
focal_class.modifier: private
focal_class.original_string: private Integer regServerPort;
focal_class.type: Integer
focal_class.var_name: regServerPort
focal_class.declarator: trustSelfSignedCertificate
focal_class.modifier: private
focal_class.original_string: private Boolean trustSelfSignedCertificate;
focal_class.type: Boolean
focal_class.var_name: trustSelfSignedCertificate
focal_class.declarator: trustSelfSignedCertificateOpt
focal_class.modifier: private
focal_class.original_string: private Option trustSelfSignedCertificateOpt;
focal_class.type: Option
focal_class.var_name: trustSelfSignedCertificateOpt
focal_class.declarator: udcServerHostOpt
focal_class.modifier: private
focal_class.original_string: private Option udcServerHostOpt;
focal_class.type: Option
focal_class.var_name: udcServerHostOpt
focal_class.declarator: useSsl
focal_class.modifier: private
focal_class.original_string: private Boolean useSsl;
focal_class.type: Boolean
focal_class.var_name: useSsl
focal_class.declarator: usernameOpt
focal_class.modifier: private
focal_class.original_string: private Option usernameOpt;
focal_class.type: Option
focal_class.var_name: usernameOpt
focal_class.file: herd-code/herd-tools/herd-retention-expiration-exporter/src/main/java/org/finra/herd/tools/retention/exporter/RetentionExpirationExporterApp.java
focal_class.identifier: RetentionExpirationExporterApp
focal_class.class_method_signature: RetentionExpirationExporterApp.RetentionExpirationExporterApp()
focal_class.full_signature:   RetentionExpirationExporterApp()
focal_class.identifier: RetentionExpirationExporterApp
focal_class.parameters: ()
focal_class.signature:  RetentionExpirationExporterApp()
focal_class.class_method_signature: RetentionExpirationExporterApp.main(String[] args)
focal_class.full_signature: @SuppressWarnings("PMD.DoNotCallSystemExit") // Using System.exit is allowed for an actual application to exit. public static void main(String[] args)
focal_class.identifier: main
focal_class.modifiers: @SuppressWarnings("PMD.DoNotCallSystemExit") // Using System.exit is allowed for an actual application to exit. public static
focal_class.parameters: (String[] args)
focal_class.return: void
focal_class.signature: void main(String[] args)
focal_class.class_method_signature: RetentionExpirationExporterApp.go(String[] args)
focal_class.full_signature:  ToolsCommonConstants.ReturnValue go(String[] args)
focal_class.identifier: go
focal_class.parameters: (String[] args)
focal_class.return: ToolsCommonConstants.ReturnValue
focal_class.signature: ToolsCommonConstants.ReturnValue go(String[] args)
focal_class.class_method_signature: RetentionExpirationExporterApp.parseCommandLineArguments(String[] args, ApplicationContext applicationContext)
focal_class.full_signature: @SuppressWarnings("PMD.SystemPrintln") @SuppressFBWarnings(value = "VA_FORMAT_STRING_USES_NEWLINE", justification = "We will use the standard carriage return character.") ToolsCommonConstants.ReturnValue parseCommandLineArguments(String[] args, ApplicationContext applicationContext)
focal_class.identifier: parseCommandLineArguments
focal_class.modifiers: @SuppressWarnings("PMD.SystemPrintln") @SuppressFBWarnings(value = "VA_FORMAT_STRING_USES_NEWLINE", justification = "We will use the standard carriage return character.")
focal_class.parameters: (String[] args, ApplicationContext applicationContext)
focal_class.return: ToolsCommonConstants.ReturnValue
focal_class.signature: ToolsCommonConstants.ReturnValue parseCommandLineArguments(String[] args, ApplicationContext applicationContext)
focal_class.class_method_signature: RetentionExpirationExporterApp.createApplicationContext()
focal_class.full_signature: private ApplicationContext createApplicationContext()
focal_class.identifier: createApplicationContext
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: ApplicationContext
focal_class.signature: ApplicationContext createApplicationContext()
focal_method.body: @SuppressWarnings("PMD.SystemPrintln")
      @SuppressFBWarnings(value = "VA_FORMAT_STRING_USES_NEWLINE", justification = "We will use the standard carriage return character.")
      ToolsCommonConstants.ReturnValue parseCommandLineArguments(String[] args, ApplicationContext applicationContext)
      {
          try
          {
              namespaceOpt = argParser.addArgument("n", "namespace", true, "Namespace.", true);
              businessObjectDefinitionNameOpt = argParser.addArgument("b", "businessObjectDefinitionName", true, "Business object definition.", true);
              localOutputFileOpt = argParser.addArgument("o", "localOutputFile", true, "The path to files on your local file system.", true);
              regServerHostOpt = argParser.addArgument("H", "regServerHost", true, "Registration Service hostname.", true);
              Option regServerPortOpt = argParser.addArgument("P", "regServerPort", true, "Registration Service port.", true);
              udcServerHostOpt = argParser.addArgument("c", "udcServerHost", true, "UDC application server hostname.", true);
              Option sslOpt = argParser.addArgument("s", "ssl", true, "Enable or disable SSL (HTTPS).", false);
              usernameOpt = argParser.addArgument("u", "username", true, "The username for HTTPS client authentication.", false);
              passwordOpt = argParser.addArgument("w", "password", true, "The password used for HTTPS client authentication.", false);
              enableEnvVariablesOpt = argParser
                  .addArgument("E", "enableEnvVariables", true, "The enableEnvVariables used for HTTPS client authentication through environment provided var.",
                      false);
              trustSelfSignedCertificateOpt =
                  argParser.addArgument("C", "trustSelfSignedCertificate", true, "If set to true, makes HTTPS client trust self-signed certificate.", false);
              disableHostnameVerificationOpt =
                  argParser.addArgument("d", "disableHostnameVerification", true, "If set to true, turns off hostname verification.", false);
              Option helpOpt = argParser.addArgument("h", "help", false, "Display usage information and exit.", false);
              Option versionOpt = argParser.addArgument("v", "version", false, "Display version information and exit.", false);
  
              // Parse command line arguments without failing on any missing required arguments by passing "false" as the second argument.
              argParser.parseArguments(args, false);
  
              // If help option was specified, then display usage information and return success.
              if (argParser.getBooleanValue(helpOpt))
              {
                  System.out.println(argParser.getUsageInformation());
                  return ToolsCommonConstants.ReturnValue.SUCCESS;
              }
  
              // If version option was specified, then display version information and return success.
              if (argParser.getBooleanValue(versionOpt))
              {
                  BuildInformation buildInformation = applicationContext.getBean(BuildInformation.class);
                  System.out.println(String
                      .format(ToolsCommonConstants.BUILD_INFO_STRING_FORMAT, buildInformation.getBuildDate(), buildInformation.getBuildNumber(),
                          buildInformation.getBuildOs(), buildInformation.getBuildUser()));
                  return ToolsCommonConstants.ReturnValue.SUCCESS;
              }
  
              // Parse command line arguments for the second time, enforcing the required arguments by passing "true" as the second argument.
              argParser.parseArguments(args, true);
  
              // Extract boolean option values passing "false" as a default value.
              useSsl = argParser.getStringValueAsBoolean(sslOpt, false);
              trustSelfSignedCertificate = argParser.getStringValueAsBoolean(trustSelfSignedCertificateOpt, false);
              disableHostnameVerification = argParser.getStringValueAsBoolean(disableHostnameVerificationOpt, false);
  
              if (useSsl)
              {
                  // Username is required when useSsl is enabled.
                  if (StringUtils.isBlank(argParser.getStringValue(usernameOpt)))
                  {
                      throw new ParseException("Username is required when SSL is enabled.");
                  }
                  // Password or enableEnvVariables with corresponding env var is required when useSsl is enabled.
                  ToolsArgumentHelper.validateCliEnvArgument(argParser, passwordOpt, enableEnvVariablesOpt);
              }
  
              // Extract all Integer option values here to catch any NumberFormatException exceptions.
              regServerPort = argParser.getIntegerValue(regServerPortOpt);
          }
          catch (ParseException ex)
          {
              // Log a friendly error and return a failure which will cause the application to exit.
              LOGGER.error("Error parsing command line arguments: " + ex.getMessage() + "\n" + argParser.getUsageInformation());
              return ToolsCommonConstants.ReturnValue.FAILURE;
          }
  
          // The command line arguments were all parsed successfully so return null to continue processing.
          return null;
      }
focal_method.class_method_signature: RetentionExpirationExporterApp.parseCommandLineArguments(String[] args, ApplicationContext applicationContext)
focal_method.full_signature: @SuppressWarnings("PMD.SystemPrintln") @SuppressFBWarnings(value = "VA_FORMAT_STRING_USES_NEWLINE", justification = "We will use the standard carriage return character.") ToolsCommonConstants.ReturnValue parseCommandLineArguments(String[] args, ApplicationContext applicationContext)
focal_method.identifier: parseCommandLineArguments
focal_method.invocations: addArgument addArgument addArgument addArgument addArgument addArgument addArgument addArgument addArgument addArgument addArgument addArgument addArgument addArgument parseArguments getBooleanValue println getUsageInformation getBooleanValue getBean println format getBuildDate getBuildNumber getBuildOs getBuildUser parseArguments getStringValueAsBoolean getStringValueAsBoolean getStringValueAsBoolean isBlank getStringValue validateCliEnvArgument getIntegerValue error getMessage getUsageInformation
focal_method.modifiers: @SuppressWarnings("PMD.SystemPrintln") @SuppressFBWarnings(value = "VA_FORMAT_STRING_USES_NEWLINE", justification = "We will use the standard carriage return character.")
focal_method.parameters: (String[] args, ApplicationContext applicationContext)
focal_method.return: ToolsCommonConstants.ReturnValue
focal_method.signature: ToolsCommonConstants.ReturnValue parseCommandLineArguments(String[] args, ApplicationContext applicationContext)