code: public static List<String> expandEnvironmentVariables(final List<String> command) {
      final ArrayList<String> res = new ArrayList<>(command.size());
      for (final String cmd : command) {
        res.add(expandEnvironmentVariables(cmd));
      }
      return res;
    }
docs: Replace {{ENV_VAR}} placeholders with the values of the corresponding environment variables.
  @param command An input list of strings with {{ENV_VAR}} placeholders
  to be replaced with the values of the corresponding environment variables.
  Replace unknown/unset variables with an empty string.
  @return A new list of strings with all the placeholders expanded.