@Test
public void containsOnce_getsAfterSubscribe() {

    final String testKey = "Test key";
    when(mockSharedPreferences.contains(testKey)).thenReturn(true);
    final Disposable subscription = rxPreferences.containsOnce(testKey)
            .subscribeOn(testScheduler)
            .subscribe();
    subscriptions.add(subscription);
    verifyNoMoreInteractions(mockSharedPreferences);
    advanceScheduler();
    verify(mockSharedPreferences).contains(testKey);
    verifyNoMoreInteractions(mockSharedPreferences);
}