@Test
void doesNotCollectSuppressedErrorsWhenSameErrorIsThrownAsync()
{

    long maxRetryTime = 20;
    int initialDelay = 15;
    int multiplier = 2;
    Clock clock = mock( Clock.class );
    when( clock.millis() ).thenReturn( 0L ).thenReturn( 10L ).thenReturn( 25L );
    ExponentialBackoffRetryLogic retryLogic = newRetryLogic( maxRetryTime, initialDelay, multiplier, 0, clock );
    Supplier<CompletionStage<Object>> workMock = newWorkMock();
    SessionExpiredException error = sessionExpired();
    when( workMock.get() ).thenReturn( failedFuture( error ) );
    Exception e = assertThrows( Exception.class, () -> await( retryLogic.retryAsync( workMock ) ) );
    assertEquals( error, e );
    assertEquals( 0, e.getSuppressed().length );
    verify( workMock, times( 3 ) ).get();
    List<Long> scheduleDelays = eventExecutor.scheduleDelays();
    assertEquals( 2, scheduleDelays.size() );
    assertEquals( initialDelay, scheduleDelays.get( 0 ).intValue() );
    assertEquals( initialDelay * multiplier, scheduleDelays.get( 1 ).intValue() );
}