@Test
void shouldRoundRobinWhenNoActiveConnections()
{

    ConnectionPool connectionPool = newConnectionPoolMock();
    RoutingTable routingTable = mock( RoutingTable.class );
    AddressSet readerAddresses = mock( AddressSet.class );
    when( readerAddresses.toArray() ).thenReturn( new BoltServerAddress[]{A, B, C} );
    when( routingTable.readers() ).thenReturn( readerAddresses );
    LoadBalancer loadBalancer = newLoadBalancer( connectionPool, routingTable );
    Set<BoltServerAddress> seenAddresses = new HashSet<>();
    for ( int i = 0; i < 10; i++ )
    {
        Connection connection = await( loadBalancer.acquireConnection( newBoltV4ConnectionContext() ) );
        seenAddresses.add( connection.serverAddress() );
    }
    assertEquals( 3, seenAddresses.size() );
    assertTrue( seenAddresses.containsAll( asList( A, B, C ) ) );
}