@Test
public void testPort_visitCount_exists() {

    when(mPrefs.contains(LegacySettingsPorter.LEGACY_PREF_VISITCOUNT)).thenReturn(true);
    when(mPrefs.getInt(LegacySettingsPorter.LEGACY_PREF_VISITCOUNT, 0)).thenReturn(16);
    mPorter.port(mTracker);
    verify(mPrefs).getInt(LegacySettingsPorter.LEGACY_PREF_VISITCOUNT, 0);
    verify(mTrackerPrefs).edit();
    verify(mTrackerPrefsEditor).putLong(Tracker.PREF_KEY_TRACKER_VISITCOUNT, 16L);
    verify(mPrefsEditor).remove(LegacySettingsPorter.LEGACY_PREF_VISITCOUNT);
}