@Test public void testConcatConcurrentWithInfinity() { final TestObservable<String> w1 = new TestObservable<String>("one", "two", "three"); final TestObservable<String> w2 = new TestObservable<String>("hello", Integer.MAX_VALUE); @SuppressWarnings("unchecked") Observer<String> observer = mock(Observer.class); @SuppressWarnings("unchecked") TestObservable<Observable<String>> observableOfObservables = new TestObservable<Observable<String>>(Observable.create(w1), Observable.create(w2)); Observable.OnSubscribeFunc<String> concatF = concat(Observable.create(observableOfObservables)); Observable<String> concat = Observable.create(concatF); concat.take(50).subscribe(observer); try { w1.waitForThreadDone(); w2.waitForThreadDone(); } 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(47)).onNext("hello"); verify(observer, times(1)).onCompleted(); verify(observer, never()).onError(any(Throwable.class)); }
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);  }