@Test
public void retryReturnsGracefullyIfKeySequenceIsNull() {

    // given
    RetryListener listener = mock(RetryListener.class);
    Map<CharSequence, ItemSource> items = new HashMap<>();
    KeySequenceSelector keySequenceSelector = mock(KeySequenceSelector.class);
    when(keySequenceSelector.firstAvailable()).thenReturn(null);
    RetryListener[] listeners = {listener};
    RetryProcessor retryProcessor =
            createRetryProcessor(DEFAULT_TEST_MAX_RETRY_SIZE, items, keySequenceSelector, listeners);
    // when
    retryProcessor.retry();
    // then
    verify(listener, never()).notify(any());
}