code: private URL buildUriWithParameters(URL url, Map<String, String> params) throws URISyntaxException, MalformedURLException {
          if (params == null || params.isEmpty()) {
              return url;
          }
          URIBuilder uriBuilder = new URIBuilder(url.toURI());
          for (String paramName : params.keySet()) {
              uriBuilder.addParameter(paramName, params.get(paramName));
          }
          return uriBuilder.build().toURL();
      }
docs: Helper method to build an {@link URL} from a baseUri and request parameters
  
  @param url    Base {@link URL}
  @param params request parameters
  @return URI