### Question:
StringPreference extends BasePreference { public String get() { return mPreferences.getString(mKey, mDefaultValue); } StringPreference(final SharedPreferences preferences, final String key);  StringPreference(final SharedPreferences preferences, final String key, final String defaultValue); String get(); void set(final String value); static final String DEFAULT_VALUE_VALUE; }### Answer:
@Test public void expect_Preference_To_EqualDefaultValue() throws Exception { final SharedPreferences sharedPreferences = getSharedPreferences(); StringPreference preference = new StringPreference(sharedPreferences, PREFERENCES_KEY); assertEquals(preference.get(), StringPreference.DEFAULT_VALUE_VALUE); }
@Test public void expect_Preference_To_EqualDefaultValue_BeforeBeingSet() throws Exception { assertEquals(mPreference.get(), mDefaultValue); assertNotEquals(mPreference.get(), mTestValue); }