### Question:
PersistenceManagerImpl implements PersistenceManager { @Override public void setSessionId(String sessionId) { sharedPreferences.edit().putString(Key.SESSION_ID, sessionId).apply(); } @VisibleForTesting  PersistenceManagerImpl(Context context); @Override void setSessionId(String sessionId); @Nullable @Override String getSessionId(); @Override void setSourceToken(String sourceToken); @Nullable @Override String getSourceToken(); @Override void clear(); @Override boolean checkedDeferredDeepLink(); @Override void updateCheckDeferredDeepLink(boolean checkedDeferredDeepLink);  }### Answer:
@Test public void setSessionId_persistToSharedPrefs() { persistenceManager.setSessionId("valid_session_id"); verify(editor).putString(PersistenceManagerImpl.Key.SESSION_ID, "valid_session_id"); verify(editor).apply(); }