// given
CustomProxySelector customProxySelector = new CustomProxySelector(defaultProxySelectorMock, config);
when(config.hasProxyConfigForHost("my.proxified.host.com")).thenReturn(true);
when(config.getProxyConfigForHost("my.proxified.host.com")).thenReturn(
new ProxyConfig("proxyhost", "1030", "http",
new HashSet(asList("my.proxified.host.com"))));
when(config.hasProxyConfigForHost("my.proxified.host2.com")).thenReturn(true);
when(config.getProxyConfigForHost("my.proxified.host2.com")).thenReturn(
new ProxyConfig("proxyhost2", "1040",
"socks",
new HashSet(asList("my.proxified.host2.com"))));
// when
List<Proxy> proxiesForProxifiedHost = customProxySelector.select(URI.create("some://my.proxified.host.com:5040"));