public Preference<String> getString(@StringRes int prefKey, @StringRes int defaultValue) {
    return getString(mResources.getString(prefKey), defaultValue);
  }
@Test
  public void testStringHappyPath() {
    RxSharedPrefs impl = new RxSharedPrefs(getApplicationContext(), this::testRestoreFunction);

    final Preference<String> preference =
        impl.getString(R.string.pref_test_key, R.string.pref_test_value);
    Assert.assertEquals("value", preference.get());

    final AtomicReference<String> observedValue = new AtomicReference<>(null);
    mCompositeDisposable.add(preference.asObservable().subscribe(observedValue::set));

    Assert.assertEquals("value", preference.get());

    SharedPrefsHelper.setPrefsValue(R.string.pref_test_key, "iw");

    Assert.assertEquals("iw", preference.get());
    Assert.assertEquals("iw", observedValue.get());
  }