globalProxy = globalProxies.get(0);
}
if (expectedProxyHost == null) {
if (proxySelector != null) {
assertThat(globalProxy.type(), is(Proxy.Type.DIRECT));
}
} else {
assertThat(proxySelector, is(not(nullValue())));
assertThat(globalProxy.type(), is(Proxy.Type.HTTP));
assertThat(expectedProxyHost, is(((InetSocketAddress) globalProxy.address()).getHostName()));