Mockito.verify(connFactory).create(Mockito.same(iosession), Mockito.<ConnectionConfig>any());
}
@Test
public void testInternalConnFactoryCreateViaProxy() throws Exception {
final ConfigData configData = new ConfigData();
final InternalConnectionFactory internalConnFactory = new InternalConnectionFactory(
configData, connFactory);
final HttpHost target = new HttpHost("somehost");
final HttpHost proxy = new HttpHost("someproxy", 8888);
final HttpRoute route = new HttpRoute(target, null, proxy, false);
final ConnectionConfig config = ConnectionConfig.custom().build();
configData.setConnectionConfig(proxy, config);
internalConnFactory.create(route, iosession);
Mockito.verify(connFactory).create(iosession, config);
}