RelativeUriBuilder { public RelativeUriBuilder replaceRawQuery(String rawQuery) { delegate = delegate.replaceRawQuery(rawQuery); return this; } private  RelativeUriBuilder(); private  RelativeUriBuilder(URI previous); static RelativeUriBuilder relativeUriBuilder(); static RelativeUriBuilder relativeUriBuilder(String path); static RelativeUriBuilder relativeUriBuilderFrom(URI uri); RelativeUriBuilder replacePath(String path); RelativeUriBuilder appendPath(String path); RelativeUriBuilder replaceParameter(String name, String... values); RelativeUriBuilder replaceParameter(String name, Iterable<String> values); RelativeUriBuilder addParameter(String name, String... values); RelativeUriBuilder addParameter(String name, Iterable<String> values); RelativeUriBuilder replaceRawQuery(String rawQuery); @Override String toString(); URI build();  }
@Test public void testReplaceRawQuery() { URI uri = relativeUriBuilderFrom(URI.create("http: .replaceRawQuery("k=1&k=2&%C3%A5=3") .build(); assertEquals(uri.toASCIIString(), "a%20/%C3%A5?k=1&k=2&%C3%A5=3"); }