@SuppressWarnings("Convert2Lambda")
@Test
public void dismissModal_rejectIfModalNotFound() {

    CommandListener listener = spy(new CommandListenerAdapter());
    Runnable onModalWillDismiss = spy(new Runnable() {
        @Override
        public void run() {
        }
    });
    uut.dismissModal(MODAL_ID_1, root, listener);
    verify(onModalWillDismiss, times(0)).run();
    verify(listener, times(1)).onError(anyString());
    verifyZeroInteractions(listener);
}