### Question:
PersistenceManagerImpl implements PersistenceManager { @Nullable @Override public String getSourceToken() { return sharedPreferences.getString(Key.SOURCE_TOKEN, null); } @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 getSourceToken_returnValidSourceToken() { when(sharedPreferences.getString(PersistenceManagerImpl.Key.SOURCE_TOKEN, null)).thenReturn( "valid_source_token"); String sourceToken = persistenceManager.getSourceToken(); assertEquals("valid_source_token", sourceToken); }