### Question:
BooleanPreference extends BasePreference { public void set(boolean value) { mPreferences.edit().putBoolean(mKey, value).apply(); } 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_BeSet() throws Exception { mPreference.set(false); assertTrue(mPreference.isSet()); }