@Test
public void getEntityReturnsPersistedWhenNull() {

    when(prefs.getString("object", null)).thenReturn(new Gson().toJson(entity));
    TestSubscriber<TestEntity> ts = new TestSubscriber<>();
    store.get().subscribe(ts);
    assertThat(ts.getOnNextEvents(), hasItems(entity));
}