@Test
void shouldHandleMultipleWritersWithActiveConnections()
{

    BoltServerAddress address1 = new BoltServerAddress( "writer", 1 );
    BoltServerAddress address2 = new BoltServerAddress( "writer", 2 );
    BoltServerAddress address3 = new BoltServerAddress( "writer", 3 );
    BoltServerAddress address4 = new BoltServerAddress( "writer", 4 );
    when( connectionPool.inUseConnections( address1 ) ).thenReturn( 5 );
    when( connectionPool.inUseConnections( address2 ) ).thenReturn( 6 );
    when( connectionPool.inUseConnections( address3 ) ).thenReturn( 0 );
    when( connectionPool.inUseConnections( address4 ) ).thenReturn( 1 );
    assertEquals( address3,
            strategy.selectWriter( new BoltServerAddress[]{address1, address2, address3, address4} ) );
}