use of org.glassfish.jersey.uri.internal.JerseyUriBuilder in project jersey by jersey.
the class JerseyWebTargetTest method testResolveTemplate2.
@Test
public void testResolveTemplate2() {
final JerseyWebTarget newTarget = target.path("path/{a}").queryParam("query", "{q}").resolveTemplate("a", "param-a");
final JerseyUriBuilder uriBuilder = (JerseyUriBuilder) newTarget.getUriBuilder();
uriBuilder.resolveTemplate("q", "param-q").resolveTemplate("a", "will-be-ignored");
assertEquals(URI.create("/path/param-a?query=param-q"), uriBuilder.build());
final UriBuilder uriBuilderNew = newTarget.resolveTemplate("a", "will-be-ignored").resolveTemplate("q", "new-q").getUriBuilder();
assertEquals(URI.create("/path/param-a?query=new-q"), uriBuilderNew.build());
}
Aggregations