@Test
public void childCompletesBetweenHasNextAndNext() {

    final FirableCursor<Integer> cursor1 = new FirableCursor<>(RecordCursor.fromList(Arrays.asList(0, 1)));
    final FirableCursor<Integer> cursor2 = new FirableCursor<>(RecordCursor.fromList(Arrays.asList(3, 4)).limitRowsTo(1));
    List<FirableCursor<Integer>> cursors = Arrays.asList(cursor1, cursor2);
    RecordCursorIterator<Integer> cursor = UnorderedUnionCursor.create(functionsFromCursors(cursors), null, null).asIterator();
    cursor2.fire();
    assertEquals(3, (int)cursor.next());
    cursor1.fire();
    assertThat(cursor.hasNext(), is(true));
    cursor2.fire();
    assertThat(cursor2.getNext().hasNext(), is(false));
    assertEquals(0, (int)cursor.next());
    cursor1.fire();
    assertEquals(1, (int)cursor.next());
    cursor1.fire();
    assertThat(cursor.hasNext(), is(false));
    assertEquals(RecordCursor.NoNextReason.RETURN_LIMIT_REACHED, cursor.getNoNextReason());
}