### Question:
NavigationEventDispatcher { void onMilestoneEvent(RouteProgress routeProgress, String instruction, Milestone milestone) { checkForArrivalEvent(routeProgress, milestone); for (MilestoneEventListener milestoneEventListener : milestoneEventListeners) { milestoneEventListener.onMilestoneEvent(routeProgress, instruction, milestone); } } NavigationEventDispatcher();   NavigationEventDispatcher(RouteUtils routeUtils);   }### Answer:
@Test public void onArrivalAlreadyOccurred_arrivalCheckIsIgnored() { String instruction = ""; Location location = mock(Location.class); BannerInstructionMilestone milestone = mock(BannerInstructionMilestone.class); RouteUtils routeUtils = mock(RouteUtils.class); when(routeUtils.isArrivalEvent(routeProgress, milestone)).thenReturn(true); when(routeUtils.isLastLeg(routeProgress)).thenReturn(true); NavigationEventDispatcher dispatcher = buildEventDispatcherHasArrived(instruction, routeUtils, milestone); dispatcher.onMilestoneEvent(routeProgress, instruction, milestone); verify(metricEventListener, times(0)).onOffRouteEvent(location); }