@Test
void shouldLogWhenUnableToCreateRoutingDriver() throws Exception
{

    StubServer server1 = StubServer.start( "discover_not_supported_9001.script", 9001 );
    StubServer server2 = StubServer.start( "discover_not_supported_9002.script", 9002 );
    Logging logging = mock( Logging.class );
    Logger logger = mock( Logger.class );
    when( logging.getLog( anyString() ) ).thenReturn( logger );
    Config config = Config.builder()
            .withoutEncryption()
            .withLogging( logging )
            .build();
    List<URI> routingUris = asList(
            URI.create( "neo4j://localhost:9001" ),
            URI.create( "neo4j://localhost:9002" ) );
    assertThrows( ServiceUnavailableException.class, () -> GraphDatabase.routingDriver( routingUris, AuthTokens.none(), config ) );
    verify( logger ).warn( eq( "Unable to create routing driver for URI: neo4j://localhost:9001" ),
            any( Throwable.class ) );
    verify( logger ).warn( eq( "Unable to create routing driver for URI: neo4j://localhost:9002" ),
            any( Throwable.class ) );
    assertEquals( 0, server1.exitStatus() );
    assertEquals( 0, server2.exitStatus() );
}