@Test public void keepsEverythingFromBaseUriExceptQuery() { UriHelper instance = new UriHelper(URI.create("http: URI resourceUri = UriBuilder.fromUri("/path2/path3").queryParam("q1", "v1").queryParam("q2", "v2").build(); String uri = instance.fromResourceUri(resourceUri).toString(); assertThat(uri, is("http: }
public URI fromResourceUri(URI resourceUri) { URI baseUri = UriBuilder.fromUri(this.baseUri).build(); return UriBuilder.fromUri(resourceUri) .userInfo(baseUri.getUserInfo()) .scheme(baseUri.getScheme()) .host(baseUri.getHost()) .port(baseUri.getPort()) .replacePath(baseUri.getPath()).path(resourceUri.getPath()) .build(); }
UriHelper { public URI fromResourceUri(URI resourceUri) { URI baseUri = UriBuilder.fromUri(this.baseUri).build(); return UriBuilder.fromUri(resourceUri) .userInfo(baseUri.getUserInfo()) .scheme(baseUri.getScheme()) .host(baseUri.getHost()) .port(baseUri.getPort()) .replacePath(baseUri.getPath()).path(resourceUri.getPath()) .build(); } }
UriHelper { public URI fromResourceUri(URI resourceUri) { URI baseUri = UriBuilder.fromUri(this.baseUri).build(); return UriBuilder.fromUri(resourceUri) .userInfo(baseUri.getUserInfo()) .scheme(baseUri.getScheme()) .host(baseUri.getHost()) .port(baseUri.getPort()) .replacePath(baseUri.getPath()).path(resourceUri.getPath()) .build(); } @JsonCreator(mode = JsonCreator.Mode.DELEGATING)  UriHelper(URI baseUri); }
UriHelper { public URI fromResourceUri(URI resourceUri) { URI baseUri = UriBuilder.fromUri(this.baseUri).build(); return UriBuilder.fromUri(resourceUri) .userInfo(baseUri.getUserInfo()) .scheme(baseUri.getScheme()) .host(baseUri.getHost()) .port(baseUri.getPort()) .replacePath(baseUri.getPath()).path(resourceUri.getPath()) .build(); } @JsonCreator(mode = JsonCreator.Mode.DELEGATING)  UriHelper(URI baseUri); URI fromResourceUri(URI resourceUri); URI getBaseUri(); void notifyOfPort(int port); }
UriHelper { public URI fromResourceUri(URI resourceUri) { URI baseUri = UriBuilder.fromUri(this.baseUri).build(); return UriBuilder.fromUri(resourceUri) .userInfo(baseUri.getUserInfo()) .scheme(baseUri.getScheme()) .host(baseUri.getHost()) .port(baseUri.getPort()) .replacePath(baseUri.getPath()).path(resourceUri.getPath()) .build(); } @JsonCreator(mode = JsonCreator.Mode.DELEGATING)  UriHelper(URI baseUri); URI fromResourceUri(URI resourceUri); URI getBaseUri(); void notifyOfPort(int port);  }