Store { Store(SharedPreferences prefs, Class<T> cls) { this.prefs = prefs; this.cls = cls; } Store(SharedPreferences prefs, Class<T> cls);   }
@Test public void entityGetsPersisted() { Observable.just(entity).map(store.store()).subscribe(); InOrder inOrder = inOrder(editor); inOrder.verify(editor).putString(eq("object"), eq(new Gson().toJson(entity))); inOrder.verify(editor).apply(); }