UriEndpointFactory { UriEndpoint createUriEndpoint(String url, boolean isWs) { return createUriEndpoint(url, isWs, connectAddress); } UriEndpointFactory(Supplier<? extends SocketAddress> connectAddress, boolean defaultSecure,
			BiFunction<String, Integer, InetSocketAddress> inetSocketAddressFunction);   }
@Test public void createUriEndpointRelative() { String test1 = this.builder.build() .createUriEndpoint("/foo", false) .toExternalForm(); String test2 = this.builder.build() .createUriEndpoint("/foo", true) .toExternalForm(); assertThat(test1).isEqualTo("http: assertThat(test2).isEqualTo("ws: }
@Test public void createUriEndpointRelativeSslSupport() { String test1 = this.builder.sslSupport() .build() .createUriEndpoint("/foo", false) .toExternalForm(); String test2 = this.builder.sslSupport() .build() .createUriEndpoint("/foo", true) .toExternalForm(); assertThat(test1).isEqualTo("https: assertThat(test2).isEqualTo("wss: }
@Test public void createUriEndpointRelativeNoLeadingSlash() { String test1 = this.builder.build() .createUriEndpoint("example.com:8080/bar", false) .toExternalForm(); String test2 = this.builder.build() .createUriEndpoint("example.com:8080/bar", true) .toExternalForm(); assertThat(test1).isEqualTo("http: assertThat(test2).isEqualTo("ws: }
@Test public void createUriEndpointRelativeAddress() { String test1 = this.builder.host("127.0.0.1") .port(8080) .build() .createUriEndpoint("/foo", false) .toExternalForm(); String test2 = this.builder.host("127.0.0.1") .port(8080) .build() .createUriEndpoint("/foo", true) .toExternalForm(); assertThat(test1).isEqualTo("http: assertThat(test2).isEqualTo("ws: }
@Test public void createUriEndpointIPv6Address() { String test1 = this.builder.host("::1") .port(8080) .build() .createUriEndpoint("/foo", false) .toExternalForm(); String test2 = this.builder.host("::1") .port(8080) .build() .createUriEndpoint("/foo", true) .toExternalForm(); assertThat(test1).isEqualTo("http: assertThat(test2).isEqualTo("ws: }
@Test public void createUriEndpointRelativeAddressSsl() { String test1 = this.builder.host("example.com") .port(8080) .sslSupport() .build() .createUriEndpoint("/foo", false) .toExternalForm(); String test2 = this.builder.host("example.com") .port(8080) .sslSupport() .build() .createUriEndpoint("/foo", true) .toExternalForm(); assertThat(test1).isEqualTo("https: assertThat(test2).isEqualTo("wss: }
@Test public void createUriEndpointRelativeWithPort() { String test = this.builder .host("example.com") .port(80) .build() .createUriEndpoint("/foo", false) .toExternalForm(); assertThat(test).isEqualTo("http: }