@Test
void shouldBeginTxAfterRunFailureToAcquireConnection()
{

    RuntimeException error = new RuntimeException( "Hi" );
    when( connectionProvider.acquireConnection( any( ConnectionContext.class ) ) )
            .thenReturn( failedFuture( error ) ).thenReturn( completedFuture( connection ) );
    Exception e = assertThrows( Exception.class, () -> run( session, "RETURN 1" ) );
    assertEquals( error, e );
    beginTransaction( session );
    verify( connectionProvider, times( 2 ) ).acquireConnection( any( ConnectionContext.class ) );
    verifyBeginTx( connection );
}