### Question:
NavigationViewEventDispatcher { void onFeedbackSent(FeedbackItem feedbackItem) { if (feedbackListener != null) { feedbackListener.onFeedbackSent(feedbackItem); } }    }### Answer:
@Test public void onFeedbackListenerNotSet_feedbackSentIsNotCalled() throws Exception { NavigationViewEventDispatcher eventDispatcher = new NavigationViewEventDispatcher(); FeedbackListener feedbackListener = mock(FeedbackListener.class); FeedbackItem item = mock(FeedbackItem.class); eventDispatcher.onFeedbackSent(item); verify(feedbackListener, times(0)).onFeedbackSent(item); }
@Test public void onFeedbackListenerNotSet_feedbackSentIsNotCalled() { NavigationViewEventDispatcher eventDispatcher = new NavigationViewEventDispatcher(); FeedbackListener feedbackListener = mock(FeedbackListener.class); FeedbackItem item = mock(FeedbackItem.class); eventDispatcher.onFeedbackSent(item); verify(feedbackListener, times(0)).onFeedbackSent(item); }