### Question:
RouteProcessorThreadListener implements RouteProcessorBackgroundThread.Listener { @Override public void onNewRouteProgress(Location location, RouteProgress routeProgress) { notificationProvider.updateNavigationNotification(routeProgress); eventDispatcher.onProgressChange(location, routeProgress); } RouteProcessorThreadListener(NavigationEventDispatcher eventDispatcher, RouteFetcher routeFetcher,
                               NavigationNotificationProvider notificationProvider); @Override void onNewRouteProgress(Location location, RouteProgress routeProgress); @Override void onMilestoneTrigger(List<Milestone> triggeredMilestones, RouteProgress routeProgress); @Override void onUserOffRoute(Location location, boolean userOffRoute); @Override void onCheckFasterRoute(Location location, RouteProgress routeProgress, boolean checkFasterRoute);  }### Answer:
@Test public void onNewRouteProgress_notificationProviderIsUpdated() { NavigationNotificationProvider provider = mock(NavigationNotificationProvider.class); RouteProcessorThreadListener listener = buildListener(provider); RouteProgress routeProgress = mock(RouteProgress.class); listener.onNewRouteProgress(mock(Location.class), routeProgress); verify(provider).updateNavigationNotification(eq(routeProgress)); }
@Test public void onNewRouteProgress_eventDispatcherProgressIsUpdated() { NavigationEventDispatcher dispatcher = mock(NavigationEventDispatcher.class); RouteProcessorThreadListener listener = buildListener(dispatcher); Location location = mock(Location.class); RouteProgress routeProgress = mock(RouteProgress.class); listener.onNewRouteProgress(location, routeProgress); verify(dispatcher).onProgressChange(eq(location), eq(routeProgress)); }