PropertiesBasedChainedProxy extends ChainedProxyAdapter { @Override public InetSocketAddress getChainedProxyAddress() { return new InetSocketAddress(this.url.split(":")[0], Integer.valueOf(this.url.split(":")[1])); } PropertiesBasedChainedProxy(String forName); String name(); boolean applies(HttpRequest request); void url(String url); void filter(String filter); void ntlm(); void basic(); void user(String user); void pass(String pass); void domain(String domain); @Override InetSocketAddress getChainedProxyAddress(); @Override TransportProtocol getTransportProtocol(); @Override boolean requiresEncryption(); @Override SSLEngine newSslEngine(); @Override void filterRequest(HttpObject httpObject); @Override void connectionSucceeded(); @Override void connectionFailed(Throwable cause); @Override NtlmHandler getNtlmHandler(); String toString();  }
@Test public void should_readUrl() { assertThat(proxy.getChainedProxyAddress(), is(new InetSocketAddress("5.5.5.5", 80))); }