@Test
public void getStoredValue() {

    preferences.edit().putBoolean("key1", true).commit();
    assertThat(rxPreferences.getBoolean("key1", false).asValue()).isEqualTo(true);
    preferences.edit().putFloat("key2", 1).commit();
    assertThat(rxPreferences.getFloat("key2", 0).asValue()).isEqualTo(1);
    preferences.edit().putInt("key3", 1).commit();
    assertThat(rxPreferences.getInt("key3", 0).asValue()).isEqualTo(1);
    preferences.edit().putLong("key4", 1).commit();
    assertThat(rxPreferences.getLong("key4", 0).asValue()).isEqualTo(1);
    preferences.edit().putString("key5", "value").commit();
    assertThat(rxPreferences.getString("key5", null).asValue()).isEqualTo("value");
    preferences.edit().putStringSet("key6", singleton("value")).commit();
    assertThat(rxPreferences.getStringSet("key6", null).asValue()).isEqualTo(singleton("value"));
}