IntegerPreference extends Preference<Integer> { @Override public boolean exists() { return contains() || getDefaultValue() != null; } IntegerPreference(final String name, final String key,
            @Nullable final Integer defaultValue); @Override boolean exists(); @Nullable @Override Integer get();  }
@Test public void testExists() throws Exception { assertFalse(mNullPref.exists()); assertTrue(mTenPref.exists()); }