code: protected String getArgumentValue(String arg, String[] args,
                                        String defalt, String passwordArgKey,
                                        ConsoleWrapper stdin, PrintStream stdout) {
          for (int i = 1; i < args.length; i++) {
              String key = args[i].split("=")[0];
              if (key.equals(arg)) {
                  String value = getValue(args[i]);
                  if (arg.equals(passwordArgKey) && value == null) {
                      return promptForPassword(stdin, stdout);
                  } else {
                      return value;
                  }
              }
          }
          return defalt;
      }
docs: Gets the value for the specified argument String. If the default
  value argument is null, it indicates the argument is required.
  
  No validation is done in the format of args as it is assumed to
  have been done previously.
  
  @param arg Argument name to resolve a value for
  @param args List of arguments. Assumes the script name is included and therefore minimum length is 2.
  @param defalt Default value if the argument is not specified
  @param passwordArgKey The password argument key (required to know when to prompt for password)
  @param stdin Standard in interface
  @param stdout Standard out interface
  @return Value of the argument
  @throws IllegalArgumentException if the argument is defined but no value is given.