@Test
public void testMergeObservableOfObservables() {

    final Observable<String> o1 = Observable.create(new TestSynchronousObservable());
    final Observable<String> o2 = Observable.create(new TestSynchronousObservable());
    Observable<Observable<String>> observableOfObservables = Observable.create(new Observable.OnSubscribeFunc<Observable<String>>() {
        @Override
        public Subscription onSubscribe(Observer<? super Observable<String>> observer) {
            // simulate what would happen in an observable
            observer.onNext(o1);
            observer.onNext(o2);
            observer.onCompleted();
            return Subscriptions.empty();
        }
    });
    Observable<String> m = Observable.create(mergeDelayError(observableOfObservables));
    m.subscribe(stringObserver);
    verify(stringObserver, never()).onError(any(Throwable.class));
    verify(stringObserver, times(1)).onCompleted();
    verify(stringObserver, times(2)).onNext("hello");
}