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

    // Using TLS with a unix socket.
    assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() ->
            DefaultDockerClient.newInstance(createConfig(DockerCloudUtils.DOCKER_DEFAULT_SOCKET_URI, true)));
    // Invalid slash count after scheme.
    assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() ->
            DefaultDockerClient.newInstance(createConfig(URI.create("unix://some/non/standard/location.sock"),
                    false)));
    // With query.
    assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() ->
            DefaultDockerClient.newInstance(createConfig(URI.create("unix:///var/run/docker.sock?param=value"),
                    false)));
}