docs: private String createListFilter(FilterableAttribute attribute, Collection<String> values) {
          /*
           * This is more complicated than you'd think... Some attribute values caused incompatible changes to the JSON data model so are actually stored in a different object in the
           * JSON. Therefore the filter that we are constructing maybe pointing to one or two attributes in the JSON. We create a filter for both possible attributes and then only
           * add the ones that we used.
           */
          boolean firstFilter1Value = true;
          boolean firstFilter2Value = true;
          StringBuilder filter1 = new StringBuilder(attribute.getAttributeName()).append("=");
          StringBuilder filter2 = new StringBuilder();
          Collection<String> filter2Values = attribute.getValuesInSecondaryAttributeName() == null ? Collections.<String> emptySet() : attribute.getValuesInSecondaryAttributeName();
          if (attribute.getSecondaryAttributeName() != null) {
              filter2 = filter2.append(attribute.getSecondaryAttributeName()).append("=");
          }
          for (String value : values) {
              if (filter2Values.contains(value)) {
                  try {
                      value = URLEncoder.encode(value, "UTF-8");
                  } catch (UnsupportedEncodingException e) {
                      // If UTF-8 encoding isn't supported we'll just have to try the unencoded string
                  }
                  if (firstFilter2Value) {
                      firstFilter2Value = false;
                  } else {
                      // OR all types so we get them all
                      filter2.append(ENCODED_BAR);
                  }
                  filter2.append(value);
              } else {
                  try {
                      value = URLEncoder.encode(value, "UTF-8");
                  } catch (UnsupportedEncodingException e) {
                      // If UTF-8 encoding isn't supported we'll just have to try the unencoded string
                  }
                  if (firstFilter1Value) {
                      firstFilter1Value = false;
                  } else {
                      // OR all types so we get them all
                      filter1.append(ENCODED_BAR);
                  }
                  filter1.append(value);
              }
          }
          if (!firstFilter1Value && !firstFilter2Value) {
              throw new IllegalArgumentException("Unable to filter values that come from two different JSON objects, attempted to filter " + attribute + " using values " + values);
          }
          if (!firstFilter1Value) {
              return filter1.toString();
          }
          if (!firstFilter2Value) {
              return filter2.toString();
          }
          return null;
      }