code: private static URI toURI(String encodedUrl) {
      try {
        return new URI(encodedUrl);
      } catch (URISyntaxException e) {
        throw new IllegalArgumentException(e);
      }
    }
docs: Returns the URI for the given encoded URL.
  
  <p>Any {@link URISyntaxException} is wrapped in an {@link IllegalArgumentException}.
  
  @param encodedUrl encoded URL
  @return URI