@@ -0,0 +1,1951 @@
+package com.gentics.mesh.util;%0A%0Aimport org.junit.Test;%0Aimport rx.Observable;%0Aimport rx.subjects.BehaviorSubject;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.List;%0Aimport java.util.concurrent.atomic.AtomicBoolean;%0Aimport java.util.concurrent.atomic.AtomicInteger;%0A%0Aimport static org.junit.Assert.*;%0A%0A%0A/**%0A * Created by philippguertler on 23.06.16.%0A */%0Apublic class RxUtilTest %7B%0A    @Test%0A    public void testLargeConcat() %7B%0A        int amount = 10000;%0A        Object testObject = new Object();%0A        ArrayList%3CObservable%3CObject%3E%3E list = new ArrayList%3C%3E(10000);%0A        for (int i = 0; i %3C 10000; i++) %7B%0A            list.add(Observable.just(testObject));%0A        %7D%0A%0A        int resultCount = RxUtil.concatList(list).count().toBlocking().single();%0A%0A        assertEquals(amount, resultCount);%0A    %7D%0A%0A    @Test%0A    public void testConcatWithSlowFirstObservable() %7B%0A        AtomicInteger expectedNumber = new AtomicInteger(1);%0A        AtomicBoolean completed = new AtomicBoolean();%0A        BehaviorSubject%3CInteger%3E sub1 = BehaviorSubject.create();%0A        BehaviorSubject%3CInteger%3E sub2 = BehaviorSubject.create();%0A        BehaviorSubject%3CInteger%3E sub3 = BehaviorSubject.create();%0A%0A        List%3CObservable%3CInteger%3E%3E list = Arrays.asList(sub1, sub2, sub3);%0A%0A        RxUtil.concatList(list).subscribe(number -%3E %7B%0A            assertEquals(expectedNumber.getAndIncrement(), (int)number);%0A        %7D, err -%3E fail(%22error occurred%22), () -%3E completed.set(true));%0A%0A        sub2.onNext(4);%0A        sub2.onNext(5);%0A%0A        sub3.onNext(7);%0A        sub3.onNext(8);%0A%0A        sub2.onNext(6);%0A        sub3.onNext(9);%0A%0A        sub2.onCompleted();%0A        sub3.onCompleted();%0A%0A        sub1.onNext(1);%0A        sub1.onNext(2);%0A        sub1.onNext(3);%0A%0A        sub1.onCompleted();%0A%0A        assertTrue(%22RxUtil.concatList should be completed%22, completed.get());%0A        assertEquals(%22All elements should be emitted%22, 10, expectedNumber.get());%0A    %7D%0A%7D%0A

add test for RxUtil