@Test
public void testConcatObservableOfObservables() {

    @SuppressWarnings("unchecked")
    Observer<String> observer = mock(Observer.class);
    final String[] o = { "1", "3", "5", "7" };
    final String[] e = { "2", "4", "6" };
    final Observable<String> odds = Observable.from(o);
    final Observable<String> even = Observable.from(e);
    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(odds);
            observer.onNext(even);
            observer.onCompleted();
            return Subscriptions.empty();
        }
    });
    Observable<String> concat = Observable.create(concat(observableOfObservables));
    concat.subscribe(observer);
    verify(observer, times(7)).onNext(anyString());
}