JerseyWebTarget implements javax.ws.rs.client.WebTarget, Initializable<JerseyWebTarget> { @Override public JerseyWebTarget resolveTemplateFromEncoded(String name, Object value) throws NullPointerException { checkNotClosed(); Preconditions.checkNotNull(name, "name is 'null'."); Preconditions.checkNotNull(value, "value is 'null'."); return new JerseyWebTarget(getUriBuilder().resolveTemplateFromEncoded(name, value), this); } JerseyWebTarget(String uri, JerseyClient parent);   JerseyWebTarget(URI uri, JerseyClient parent);   JerseyWebTarget(UriBuilder uriBuilder, JerseyClient parent);   JerseyWebTarget(Link link, JerseyClient parent); protected  JerseyWebTarget(UriBuilder uriBuilder, JerseyWebTarget that); protected  JerseyWebTarget(UriBuilder uriBuilder, ClientConfig clientConfig); @Override URI getUri(); @Override UriBuilder getUriBuilder(); @Override JerseyWebTarget path(String path); @Override JerseyWebTarget matrixParam(String name, Object... values); @Override JerseyWebTarget queryParam(String name, Object... values); @Override JerseyInvocation.Builder request(); @Override JerseyInvocation.Builder request(String... acceptedResponseTypes); @Override JerseyInvocation.Builder request(MediaType... acceptedResponseTypes); @Override JerseyWebTarget resolveTemplate(String name, Object value); @Override JerseyWebTarget resolveTemplate(String name, Object value, boolean encodeSlashInPath); @Override JerseyWebTarget resolveTemplateFromEncoded(String name, Object value); @Override JerseyWebTarget resolveTemplates(Map<String, Object> templateValues); @Override JerseyWebTarget resolveTemplates(Map<String, Object> templateValues, boolean encodeSlashInPath); @Override JerseyWebTarget resolveTemplatesFromEncoded(Map<String, Object> templateValues); @Override JerseyWebTarget register(Class<?> providerClass); @Override JerseyWebTarget register(Object provider); @Override JerseyWebTarget register(Class<?> providerClass, int bindingPriority); @Override JerseyWebTarget register(Class<?> providerClass, Class<?>... contracts); @Override JerseyWebTarget register(Class<?> providerClass, Map<Class<?>, Integer> contracts); @Override JerseyWebTarget register(Object provider, int bindingPriority); @Override JerseyWebTarget register(Object provider, Class<?>... contracts); @Override JerseyWebTarget register(Object provider, Map<Class<?>, Integer> contracts); @Override JerseyWebTarget property(String name, Object value); @Override ClientConfig getConfiguration(); @Override JerseyWebTarget preInitialize(); @Override String toString();  }
@Test public void testResolveTemplateFromEncoded() { final String a = "a%20%3F a).resolveTemplateFromEncoded("b", b).getUri().toString()); assertEquals("/path/a%2520%253F%2F*%2F/%2Fb%2F", target.path("path/{a}/{b}").resolveTemplate("a", a).resolveTemplate("b", b).getUri().toString()); assertEquals("/path/a%2520%253F/* a, false).resolveTemplate("b", b, false).getUri().toString()); }
@Test(expected = NullPointerException.class) public void testResolveTemplateFromEncodedNull1() { WebTarget wt = target; wt.resolveTemplateFromEncoded(null, ""); }
@Test(expected = NullPointerException.class) public void testResolveTemplateFromEncodedNull2() { WebTarget wt = target; wt.resolveTemplateFromEncoded("name", null); }