@Test
public void testPort_firstVisit_exists() {

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