code: private static String encodeExampleForUrl(Object example) {
          try {
              return URLEncoder.encode(String.valueOf(example), "UTF-8");
          } catch (UnsupportedEncodingException exception) {
              throw new RuntimeException(exception);
          }
      }
docs: Encodes an example value for use in an URL
  
  @param example the example value
  @return encoded example value