public void shouldBePopulatedWithNumberOfServersOnLessSenderThreads() throws Exception {
props.setProperty(ClientConfig.ASYNC_SENDER_THREADS, "1");
createInjector();
ILoadBalancer lb = mock(ILoadBalancer.class);
List<Server> servers = new LinkedList<Server>();
for (SuroServer4Test suroServer4Test : this.servers) {
servers.add(new Server("localhost", suroServer4Test.getPort()));
}
when(lb.getServerList(true)).thenReturn(servers);
ConnectionPool pool = new ConnectionPool(injector.getInstance(ClientConfig.class), lb);
assertTrue(pool.getPoolSize() >= 1);
for (int i = 0; i < 10; ++i) {
if (pool.getPoolSize() != 3) {