public boolean savePersonalInfo(SharedPreferenceEntry sharedPreferenceEntry){
        // Start a SharedPreferences transaction.
        SharedPreferences.Editor editor = mSharedPreferences.edit();
        editor.putString(KEY_NAME, sharedPreferenceEntry.getName());
        editor.putLong(KEY_DOB, sharedPreferenceEntry.getDateOfBirth().getTimeInMillis());
        editor.putString(KEY_EMAIL, sharedPreferenceEntry.getEmail());

        // Commit changes to SharedPreferences.
        return editor.commit();
    }
Saves the given {@link SharedPreferenceEntry} that contains the user's settings to
{@link SharedPreferences}.

@param sharedPreferenceEntry contains data to save to {@link SharedPreferences}.
@return {@code true} if writing to {@link SharedPreferences} succeeded. {@code false}
        otherwise.
unit/BasicSample/app/src/main/java/com/example/android/testing/unittesting/BasicSample/SharedPreferencesHelper.java