@Test public void testConcatNonBlockingObservables() { final CountDownLatch okToContinueW1 = new CountDownLatch(1); final CountDownLatch okToContinueW2 = new CountDownLatch(1); final TestObservable<String> w1 = new TestObservable<String>(null, okToContinueW1, "one", "two", "three"); final TestObservable<String> w2 = new TestObservable<String>(null, okToContinueW2, "four", "five", "six"); @SuppressWarnings("unchecked") Observer<String> observer = mock(Observer.class); Observable<Observable<String>> observableOfObservables = Observable.create(new Observable.OnSubscribeFunc<Observable<String>>() { @Override public Subscription onSubscribe(Observer<? super Observable<String>> observer) { observer.onNext(Observable.create(w1)); observer.onNext(Observable.create(w2)); observer.onCompleted(); return Subscriptions.empty(); } }); Observable<String> concat = Observable.create(concat(observableOfObservables)); concat.subscribe(observer); verify(observer, times(0)).onCompleted(); try { okToContinueW1.countDown(); okToContinueW2.countDown(); w1.t.join(); w2.t.join(); } catch (InterruptedException e) { e.printStackTrace(); } InOrder inOrder = inOrder(observer); inOrder.verify(observer, times(1)).onNext("one"); inOrder.verify(observer, times(1)).onNext("two"); inOrder.verify(observer, times(1)).onNext("three"); inOrder.verify(observer, times(1)).onNext("four"); inOrder.verify(observer, times(1)).onNext("five"); inOrder.verify(observer, times(1)).onNext("six"); verify(observer, times(1)).onCompleted(); }
public static <T> OnSubscribeFunc<T> concat(final Observable<? extends T>... sequences) { return concat(Observable.from(sequences)); }
OperationConcat { public static <T> OnSubscribeFunc<T> concat(final Observable<? extends T>... sequences) { return concat(Observable.from(sequences)); } }
OperationConcat { public static <T> OnSubscribeFunc<T> concat(final Observable<? extends T>... sequences) { return concat(Observable.from(sequences)); }  }
OperationConcat { public static <T> OnSubscribeFunc<T> concat(final Observable<? extends T>... sequences) { return concat(Observable.from(sequences)); }  static OnSubscribeFunc<T> concat(final Observable<? extends T>... sequences); static OnSubscribeFunc<T> concat(final Iterable<? extends Observable<? extends T>> sequences); static OnSubscribeFunc<T> concat(final Observable<? extends Observable<? extends T>> sequences); }
OperationConcat { public static <T> OnSubscribeFunc<T> concat(final Observable<? extends T>... sequences) { return concat(Observable.from(sequences)); }  static OnSubscribeFunc<T> concat(final Observable<? extends T>... sequences); static OnSubscribeFunc<T> concat(final Iterable<? extends Observable<? extends T>> sequences); static OnSubscribeFunc<T> concat(final Observable<? extends Observable<? extends T>> sequences);  }