GuidanceEstimatedArrivalViewPresenter extends BaseGuidancePresenter { @Override protected void handlePositionUpdate() { updateEtaData(getEta(), getDestinationDistance(), getTimeToArrival()); } GuidanceEstimatedArrivalViewPresenter(NavigationManager navigationManager); void addListener(GuidanceEstimatedArrivalViewListener listener); void removeListener(GuidanceEstimatedArrivalViewListener listener);  }
@Test public void testHandlePositionUpdate() { final GuidanceEstimatedArrivalViewListener listener = mock(GuidanceEstimatedArrivalViewListener.class); mEstimatedArrivalPresenter.addListener(listener); prepareNavigationManagerForCorrectHandlePositionUpdate(); mEstimatedArrivalPresenter.handlePositionUpdate(); verify(listener).onDataChanged(any()); }