@Test
public void stopAndContinue() {

    RecordCursor<Integer> cursor = newCursor(i -> i > 2, null, MapWhileCursor.StopContinuation.AFTER, RecordCursor.NoNextReason.SCAN_LIMIT_REACHED);
    assertEquals(Arrays.asList(2, 3), cursor.asList().join());
    validateNoNextReason(cursor, RecordCursor.NoNextReason.SCAN_LIMIT_REACHED);
    cursor = newCursor(i -> i > 5, cursor.getNext().getContinuation().toBytes(), MapWhileCursor.StopContinuation.AFTER, RecordCursor.NoNextReason.SCAN_LIMIT_REACHED);
    assertEquals(Arrays.asList(5, 6), cursor.asList().join());
    validateNoNextReason(cursor, RecordCursor.NoNextReason.SOURCE_EXHAUSTED);
}