### Question:
Url implements Comparable<Url> { private Url(Builder builder) { this.scheme = builder.scheme; this.authority = builder.authority; this.path = builder.path; this.query = Optional.ofNullable(builder.queryBuilder).map(UrlQuery.Builder::build); this.fragment = builder.fragment; } private  Url(Builder builder); String scheme(); String path(); Optional<String> fragment(); Optional<Authority> authority(); Optional<String> host(); boolean isSecure(); boolean isFullyQualified(); boolean isAbsolute(); boolean isRelative(); URL toURL(); URI toURI(); Optional<String> queryParam(String name); Iterable<String> queryParams(String name); Map<String, List<String>> queryParams(); Iterable<String> queryParamNames(); String encodedUri(); @Override String toString(); @Override int compareTo(Url other); @Override int hashCode(); @Override boolean equals(Object obj); Builder newBuilder();  }### Answer:
@Test public void unwiseCharsAreNotAccepted() throws Exception { String urlWithUnwiseChars = "/search.do?foo={&srsReport=Landing|AutoS|HOTEL|Hotel%20Il%20Duca%20D%27Este|0|0|0|2|1|2|284128&srsr=Landing|AutoS|HOTEL|Hotel%20Il%20Duca%20D%27Este|0|0|0|2|1|2|284128"; assertThrows(IllegalArgumentException.class, () -> url(urlWithUnwiseChars).build()); }