@Test
void eachRetryIsLogged()
{

    int retries = 9;
    Clock clock = mock( Clock.class );
    Logging logging = mock( Logging.class );
    Logger logger = mock( Logger.class );
    when( logging.getLog( anyString() ) ).thenReturn( logger );
    ExponentialBackoffRetryLogic logic = new ExponentialBackoffRetryLogic( RetrySettings.DEFAULT, eventExecutor,
            clock, logging );
    retry( logic, retries );
    verify( logger, times( retries ) ).warn(
            startsWith( "Transaction failed and will be retried" ),
            any( ServiceUnavailableException.class )
    );
}