@Test
public void platformDependentSettings() {

    if (DockerCloudUtils.isWindowsHost()) {
        assertThatExceptionOfType(IllegalArgumentException.class).
                isThrownBy(() -> DefaultDockerClient.newInstance(createConfig(DockerCloudUtils
                        .DOCKER_DEFAULT_SOCKET_URI, false)));
        DefaultDockerClient.newInstance(createConfig(DockerCloudUtils.DOCKER_DEFAULT_NAMED_PIPE_URI, false))
                .close();
        // Empty authority and absolute path.
        DefaultDockerClient.newInstance(createConfig(URI.create("npipe://///./pipe/non_standard_location"),
                false)).close();
    } else {
        assertThatExceptionOfType(IllegalArgumentException.class).
                isThrownBy(() -> DefaultDockerClient.newInstance(createConfig(DockerCloudUtils
                        .DOCKER_DEFAULT_NAMED_PIPE_URI, false)));
        DefaultDockerClient.newInstance(createConfig(DockerCloudUtils.DOCKER_DEFAULT_SOCKET_URI, false)).close();
        // Minimal valid url: scheme and absolute path.
        DefaultDockerClient.newInstance(createConfig(URI.create("unix:/some/non/sandard/location.sock"), false))
                .close();
        // Also accepted: empty authority and absolute path.
        DefaultDockerClient.newInstance(createConfig(URI.create("unix:///some/non/sandard/location.sock"), false)
        ).close();
    }
}