@Test
public void testMergeArrayWithThreading() {

    final TestASynchronousObservable o1 = new TestASynchronousObservable();
    final TestASynchronousObservable o2 = new TestASynchronousObservable();
    @SuppressWarnings("unchecked")
    Observable<String> m = Observable.create(mergeDelayError(Observable.create(o1), Observable.create(o2)));
    m.subscribe(stringObserver);
    try {
        o1.t.join();
        o2.t.join();
    } catch (InterruptedException e) {
        throw new RuntimeException(e);
    }
    verify(stringObserver, never()).onError(any(Throwable.class));
    verify(stringObserver, times(2)).onNext("hello");
    verify(stringObserver, times(1)).onCompleted();
}