AppObservable { public static <T> Observable<T> bindSupportFragment(android.support.v4.app.Fragment fragment, Observable<T> source) { Assertions.assertUiThread(); return source.observeOn(mainThread()) .lift(new OperatorConditionalBinding<T, android.support.v4.app.Fragment>(fragment, FRAGMENTV4_VALIDATOR)); } private  AppObservable(); static Observable<T> bindActivity(Activity activity, Observable<T> source); static Observable<T> bindFragment(Fragment fragment, Observable<T> source); static Observable<T> bindSupportFragment(android.support.v4.app.Fragment fragment, Observable<T> source);  }
@Test public void itSupportsFragmentsFromTheSupportV4Library() { AppObservable.bindSupportFragment(supportFragment, Observable.just("success")).subscribe(new TestObserver<String>(observer)); verify(observer).onNext("success"); verify(observer).onCompleted(); }
@Test public void bindSupportFragmentToSourceFromDifferentThread() throws InterruptedException { CountDownLatch done = new CountDownLatch(1); AppObservable.bindSupportFragment(supportFragment, TestUtil.atBackgroundThread(done)).subscribe(new TestObserver<String>(observer)); done.await(); ShadowLooper.runUiThreadTasksIncludingDelayedTasks(); verify(observer).onNext(TestUtil.STRING_EXPECTATION); verify(observer).onCompleted(); }