@Test
void shouldFailEarlyOnSecurityErrorWhenSupportMultiDbTestFails() throws Throwable
{

    Set<BoltServerAddress> unavailableAddresses = asOrderedSet( A, B );
    ConnectionPool connectionPool = newConnectionPoolMockWithFailures( unavailableAddresses, address -> new AuthenticationException( "code", "error" ) );
    Rediscovery rediscovery = mock( Rediscovery.class );
    when( rediscovery.resolve() ).thenReturn( Arrays.asList( A, B ) );
    LoadBalancer loadBalancer = newLoadBalancer( connectionPool, rediscovery );
    AuthenticationException exception = assertThrows( AuthenticationException.class, () -> await( loadBalancer.verifyConnectivity() ) );
    assertThat( exception.getMessage(), startsWith( "error" ) );
}