HttpUriBuilder { public HttpUriBuilder replaceRawQuery(String rawQuery) { params.clear(); params.putAll(parseParams(rawQuery)); return this; } private  HttpUriBuilder(); private  HttpUriBuilder(URI previous); static HttpUriBuilder uriBuilder(); static HttpUriBuilder uriBuilderFrom(URI uri); HttpUriBuilder scheme(String scheme); HttpUriBuilder host(String host); HttpUriBuilder port(int port); HttpUriBuilder defaultPort(); HttpUriBuilder hostAndPort(HostAndPort hostAndPort); HttpUriBuilder replacePath(String path); HttpUriBuilder appendPath(String path); HttpUriBuilder replaceParameter(String name, String... values); HttpUriBuilder replaceParameter(String name, Iterable<String> values); HttpUriBuilder addParameter(String name, String... values); HttpUriBuilder addParameter(String name, Iterable<String> values); HttpUriBuilder replaceRawQuery(String rawQuery); @Override String toString(); URI build();  }
@Test public void testReplaceRawQuery() { URI uri = uriBuilderFrom(URI.create("http: .replaceRawQuery("k=1&k=2&%C3%A5=3") .build(); assertEquals(uri.toASCIIString(), "http: }