@Test
public void testHandlePositionUpdate() {

    GuidanceSpeedListener listener = mock(GuidanceSpeedListener.class);
    mCurrentSpeedPresenter.addListener(listener);
    //for incorrect data
    when(mPositioningManager.hasValidPosition()).thenReturn(false);
    mCurrentSpeedPresenter.handlePositionUpdate();
    verify(listener).onDataChanged(any());
    when(mPositioningManager.hasValidPosition()).thenReturn(true);
    GeoPosition geoPos = mock(GeoPosition.class);
    when(geoPos.isValid()).thenReturn(true);
    when(geoPos.getSpeed()).thenReturn(10.0);
    when(mPositioningManager.getPosition()).thenReturn(geoPos);
    mCurrentSpeedPresenter.handlePositionUpdate();
    verify(listener, times(2)).onDataChanged(any());
}