UriBuilderImpl extends UriBuilder { @Override public URI buildFromEncoded(Object... values) { checkArgument(values != null, "Null values aren't allowed"); String uri; encodeFragment(); if (ssp != null) { uri = createUriFromSspWithValues(values, false); } else { preparePath(); uri = createUriWithValues(values, false, false); } try { return new URI(uri); } catch (URISyntaxException e) { throw new UriBuilderException(e); } } UriBuilderImpl(); protected  UriBuilderImpl(UriBuilderImpl cloned); @Override URI buildFromMap(Map<String, ?> values); @Override URI buildFromMap(Map<String, ?> values, boolean encodeSlashInPath); @Override URI buildFromEncodedMap(Map<String, ?> values); @Override URI build(Object... values); @Override URI build(Object[] values, boolean encodeSlashInPath); @Override URI buildFromEncoded(Object... values); @Override String toTemplate(); @Override UriBuilder clone(); @Override UriBuilder fragment(String fragment); @Override UriBuilder resolveTemplate(String name, Object value); @Override UriBuilder resolveTemplate(String name, Object value, boolean encodeSlashInPath); @Override UriBuilder resolveTemplateFromEncoded(String name, Object value); @Override UriBuilder resolveTemplates(Map<String, Object> templateValues); @Override UriBuilder resolveTemplates(Map<String, Object> templateValues, boolean encodeSlashInPath); @Override UriBuilder resolveTemplatesFromEncoded(Map<String, Object> templateValues); @Override UriBuilder host(String host); @Override UriBuilder matrixParam(String name, Object... values); @Override UriBuilder path(String addingPath); @SuppressWarnings({"unchecked"}) @Override UriBuilder path(Class resource); @Override UriBuilder path(Method method); @Override UriBuilder path(Class resource, String method); @Override UriBuilder port(int port); @Override UriBuilder queryParam(String name, Object... values); @Override UriBuilder replaceMatrixParam(String name, Object... values); @Override UriBuilder replaceMatrix(String matrix); @Override UriBuilder replacePath(String path); @Override UriBuilder replaceQueryParam(String name, Object... values); @Override UriBuilder replaceQuery(String queryString); @Override UriBuilder scheme(String schema); @Override UriBuilder schemeSpecificPart(String ssp); @Override UriBuilder segment(String... segments); @Override UriBuilder uri(URI uri); @Override UriBuilder uri(String uriTemplate); @Override UriBuilder userInfo(String userInfo);  }
@UseDataProvider("forBuildsUriFromEncodedArray") @Test public void buildsUriFromEncodedArray(String source, Object[] array, String expected) { URI uri = UriBuilder.fromUri(source).buildFromEncoded(array); assertEquals(URI.create(expected), uri); }