code: private static String formatParameterValueAsUnescapedVariableTemplate(final Object parameterValue) {
          // Get the value
          if (parameterValue == null) { // If null (= NO_VALUE), empty String
              return "";
          }
          // If it is not multivalued (e.g. non-List) simply escape and return
          if (!(parameterValue instanceof List<?>)) {
              return parameterValue.toString();
          }
          // It is multivalued, so iterate and escape each item (no need to escape the comma separating them, it's an allowed char)
          final List<?> values = (List<?>)parameterValue;
          final int valuesLen = values.size();
          final StringBuilder strBuilder = new StringBuilder(valuesLen * 16);
          for (int i = 0; i < valuesLen; i++) {
              final Object valueItem = values.get(i);
              if (strBuilder.length() > 0) {
                  strBuilder.append(',');
              }
              strBuilder.append(valueItem == null? "" : valueItem.toString());
          }
          return strBuilder.toString();
      }
docs: /*
  This method will return a String containing all the values for a specific parameter, separated with commas
  and suitable therefore to be used as variable template (path variables) replacements