@Test
public void roundRobin() {

    final List<Integer> expectedResults = Arrays.asList(0, 401, 2, 100, 201, 302, 200, 1, 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();
    int currentCursor = 0;
    while (expectedIterator.hasNext()) {
        cursors.get(currentCursor).fire();
        int nextValue = cursor.next();
        assertEquals((int)expectedIterator.next(), nextValue);
        currentCursor = (currentCursor + 1) % cursors.size();
    }
    cursors.forEach(FirableCursor::fireAll);
    assertThat(cursor.hasNext(), is(false));
    assertThat(cursor.getNoNextReason().isSourceExhausted(), is(true));
}