@Test public void shouldAggregateMultiplePaths() throws Exception { HttpUrl base = HttpUrl.parse("http: PathResolver resolver = new PathResolver.Builder() .addPaths("/path/a/b") .build(); HttpUrl expected = resolver.resolve(base); assertThat(expected, is(HttpUrl.parse("http: }
public HttpUrl resolve(HttpUrl base) { HttpUrl.Builder builder = base.newBuilder(); for (String path : mPaths) { builder.addPathSegment(path); } return builder.build(); }
PathResolver { public HttpUrl resolve(HttpUrl base) { HttpUrl.Builder builder = base.newBuilder(); for (String path : mPaths) { builder.addPathSegment(path); } return builder.build(); } }
PathResolver { public HttpUrl resolve(HttpUrl base) { HttpUrl.Builder builder = base.newBuilder(); for (String path : mPaths) { builder.addPathSegment(path); } return builder.build(); } PathResolver(List<String> paths); }
PathResolver { public HttpUrl resolve(HttpUrl base) { HttpUrl.Builder builder = base.newBuilder(); for (String path : mPaths) { builder.addPathSegment(path); } return builder.build(); } PathResolver(List<String> paths); HttpUrl resolve(HttpUrl base); }
PathResolver { public HttpUrl resolve(HttpUrl base) { HttpUrl.Builder builder = base.newBuilder(); for (String path : mPaths) { builder.addPathSegment(path); } return builder.build(); } PathResolver(List<String> paths); HttpUrl resolve(HttpUrl base);  }