@Test
@SuppressWarnings("ConstantConditions")
public void invalidNPipeSettings() {

    // Using TLS with a unix socket.
    assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() ->
            DefaultDockerClient.newInstance(createConfig(DockerCloudUtils.DOCKER_DEFAULT_NAMED_PIPE_URI, true)));
    // Invalid slash count after scheme.
    assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() ->
            DefaultDockerClient.newInstance(createConfig(URI.create("npipe:///./pipe/non_standard_location"),
                    false)));
    // With query.
    assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() ->
            DefaultDockerClient.newInstance(createConfig(URI.create("npipe:////" +
                    "./pipe/non_standard_location?param=value"), false)));
}