MesosClient { @NotNull static URI resolveRelativeUri(final @NotNull URI mesosUri, final String location) { final URI relativeUri = mesosUri.resolve(location); try { return new URI( relativeUri.getScheme(), relativeUri.getUserInfo(), relativeUri.getHost(), relativeUri.getPort(), mesosUri.getPath(), mesosUri.getQuery(), mesosUri.getFragment() ); } catch (URISyntaxException e) { throw new RuntimeException(e); } } MesosClient(
        @NotNull final URI mesosUri,
        @NotNull final Function<Class<?>, UserAgentEntry> applicationUserAgentEntry,
        @NotNull final MessageCodec<Send> sendCodec,
        @NotNull final MessageCodec<Receive> receiveCodec,
        @NotNull final Send subscribe,
        @NotNull final Function<Observable<Receive>, Observable<Optional<SinkOperation<Send>>>> streamProcessor,
        @NotNull final  Observable.Transformer<byte[], byte[]> backpressureTransformer
    ); @NotNull AwaitableSubscription openStream();  }
@Test public void testResolveRelativeUri_usesSchemeHostAndPortFromLocation() throws Exception { final URI mesosUri = URI.create("http: final String location = " final URI actual = MesosClient.resolveRelativeUri(mesosUri, location); assertThat(actual).isEqualTo(URI.create("http: }
@Test public void testResolveRelativeUri_usesSchemeHostAndPortFromLocation_defaultPort() throws Exception { final URI mesosUri = URI.create("http: final String location = " final URI actual = MesosClient.resolveRelativeUri(mesosUri, location); assertThat(actual).isEqualTo(URI.create("http: }