### Question:
NavigationLocationEngineUpdater { void updateLocationEngine(LocationEngine locationEngine) { removeLocationEngineListener(); this.locationEngine = locationEngine; locationEngine.addLocationEngineListener(listener); } NavigationLocationEngineUpdater(LocationEngine locationEngine, NavigationLocationEngineListener listener);   }### Answer:
@Test public void updateLocationEngine_engineListenerIsAdded() { LocationEngine locationEngine = mock(LocationEngine.class); NavigationLocationEngineListener listener = mock(NavigationLocationEngineListener.class); NavigationLocationEngineUpdater provider = new NavigationLocationEngineUpdater(locationEngine, listener); LocationEngine newLocationEngine = mock(LocationEngine.class); provider.updateLocationEngine(newLocationEngine); verify(newLocationEngine).addLocationEngineListener(eq(listener)); }