@Test
public void waitsIfBackoffMillisConfigured() {

    // given
    System.setProperty("appenders.retry.backoff.millis", "100");
    RetryListener listener = mock(RetryListener.class);
    ItemSource itemSource = mock(ItemSource.class);
    int sequenceId = random.nextInt(1000) + RESERVED_KEYS;
    Map<CharSequence, ItemSource> items = new HashMap<>();
    KeySequenceSelector keySequenceSelector = createDefaultTestKeySequenceSelector(sequenceId, items);
    fillMap(items, 1, keySequenceSelector, () -> itemSource);
    RetryListener[] listeners = {listener};
    RetryProcessor retryProcessor =
            createRetryProcessor(DEFAULT_TEST_MAX_RETRY_SIZE, items, keySequenceSelector, listeners);
    // when
    long start = System.currentTimeMillis();
    retryProcessor.run();
    long end = System.currentTimeMillis();
    // then
    assertTrue(end - start >= 100);
}