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