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