User { void setUser(@NonNull String userId, @NonNull String userToken) { Logger.debug("RichPushUser - Setting Rich Push user: %s", userId); preferences.put(USER_ID_KEY, userId); preferences.put(USER_TOKEN_KEY, encode(userToken, userId)); } User(@NonNull PreferenceDataStore preferenceDataStore, @NonNull AirshipChannel channel); void addListener(@NonNull Listener listener); void removeListener(@NonNull Listener listener); static boolean isCreated(); boolean isUserCreated(); @Nullable String getId(); @Nullable String getPassword();  }
@Test public void testUserTokenObfuscated() { user.setUser(fakeUserId, fakeUserId); assertNotEquals(fakeToken, dataStore.getString("com.urbanairship.user.USER_TOKEN", fakeToken)); }