@Test
public void testDownloadMapping_exists() {

    final Map<String, Object> map = new HashMap<>();
    String key1 = "downloaded:testkey1";
    map.put(key1, true);
    String key2 = "downloaded:testkey2";
    map.put(key2, false);
    String key3 = "testkey2";
    map.put(key3, 123465);
    when(mPrefs.getAll()).thenAnswer((Answer<Map<String, ?>>) invocation -> map);
    mPorter.port(mTracker);
    verify(mPrefs).getAll();
    verify(mPrefsEditor).remove(key1);
    verify(mPrefsEditor).remove(key2);
    verify(mPrefsEditor, never()).remove(key3);
    verify(mTrackerPrefsEditor).putBoolean(key1, true);
    verify(mTrackerPrefsEditor).putBoolean(key2, true);
    verify(mTrackerPrefsEditor, never()).putBoolean(eq(key3), anyBoolean());
}