@Test
public void concat() {

    final int childCursorSize = 3;
    final List<Integer> expectedResults = Arrays.asList(0, 100, 200, 401, 201, 1, 2, 302, 102);
    final List<FirableCursor<Integer>> cursors = Arrays.asList(
            new FirableCursor<>(RecordCursor.fromList(Arrays.asList(0, 100, 200))),
            new FirableCursor<>(RecordCursor.fromList(Arrays.asList(401, 201, 1))),
            new FirableCursor<>(RecordCursor.fromList(Arrays.asList(2, 302, 102)))
    );
    final RecordCursorIterator<Integer> cursor = UnorderedUnionCursor.create(functionsFromCursors(cursors), null, null).asIterator();
    Iterator<Integer> expectedIterator = expectedResults.iterator();
    for (FirableCursor<Integer> childCursor : cursors) {
        childCursor.fireAll();
        for (int i = 0; i < childCursorSize; i++) {
            assertEquals((int)expectedIterator.next(), (int)cursor.next());
        }
        assertThat(childCursor.getNext().hasNext(), is(false));
    }
    assertThat(cursor.hasNext(), is(false));
    assertThat(cursor.getNoNextReason().isSourceExhausted(), is(true));
}