GuidanceStreetLabelPresenter extends BaseGuidancePresenter { public void removeListener(GuidanceStreetLabelListener listener) { mListener.remove(listener); } GuidanceStreetLabelPresenter(Context context, NavigationManager navigationManager,
                                        Route route); @Override void handleNewInstructionEvent(); @Override void handleManeuverEvent(); void addListener(GuidanceStreetLabelListener listener); void removeListener(GuidanceStreetLabelListener listener);  }
@Test public void testRemoveListener() { final Maneuver maneuver = MockUtils.mockManeuver(); GuidanceStreetLabelListener listener = mock(GuidanceStreetLabelListener.class); mGuidanceStreetLabelPresenter.addListener(listener); when(mNavigationManager.getNextManeuver()).thenReturn(maneuver); when(mNavigationManager.getNextManeuverDistance()).thenReturn(200L); mGuidanceStreetLabelPresenter.handleManeuverEvent(); verify(listener, times(2)).onDataChanged(any()); mGuidanceStreetLabelPresenter.removeListener(listener); mGuidanceStreetLabelPresenter.handleManeuverEvent(); verifyNoMoreInteractions(listener); }