@Test
public void testPort_previousVisit_exists() {

    when(mPrefs.contains(LegacySettingsPorter.LEGACY_PREF_PREV_VISIT)).thenReturn(true);
    when(mPrefs.getLong(LegacySettingsPorter.LEGACY_PREF_PREV_VISIT, -1)).thenReturn(1111L);
    mPorter.port(mTracker);
    verify(mPrefs).getLong(LegacySettingsPorter.LEGACY_PREF_PREV_VISIT, -1);
    verify(mTrackerPrefs).edit();
    verify(mTrackerPrefsEditor).putLong(Tracker.PREF_KEY_TRACKER_PREVIOUSVISIT, 1111L);
    verify(mPrefsEditor).remove(LegacySettingsPorter.LEGACY_PREF_PREV_VISIT);
}