### Question:
NavigationViewEventDispatcher { void onFailedReroute(String errorMessage) { if (routeListener != null) { routeListener.onFailedReroute(errorMessage); } }    }### Answer:
@Test public void onRouteListenerNotSet_failedListenerIsNotCalled() throws Exception { NavigationViewEventDispatcher eventDispatcher = new NavigationViewEventDispatcher(); RouteListener routeListener = mock(RouteListener.class); String errorMessage = "errorMessage"; eventDispatcher.onFailedReroute(errorMessage); verify(routeListener, times(0)).onFailedReroute(errorMessage); }