### Question:
NavigationLocationEngineUpdater { @SuppressWarnings("MissingPermission") void forceLocationUpdate(DirectionsRoute route) { Location location = locationEngine.getLastLocation(); if (!listener.isValidLocationUpdate(location)) { routeUtils = obtainRouteUtils(); location = routeUtils.createFirstLocationFromRoute(route); } listener.queueLocationUpdate(location); } NavigationLocationEngineUpdater(LocationEngine locationEngine, NavigationLocationEngineListener listener);   }### Answer:
@Test public void forceLocationUpdate_nonNullLastLocationIsSent() { LocationEngine locationEngine = mock(LocationEngine.class); when(locationEngine.getLastLocation()).thenReturn(mock(Location.class)); NavigationLocationEngineListener listener = mock(NavigationLocationEngineListener.class); when(listener.isValidLocationUpdate(any(Location.class))).thenReturn(true); NavigationLocationEngineUpdater provider = new NavigationLocationEngineUpdater(locationEngine, listener); provider.forceLocationUpdate(mock(DirectionsRoute.class)); verify(listener).queueLocationUpdate(any(Location.class)); }