{
testMultipleCursors(true);
}
private void testMultipleCursors(boolean openAll) {
RowCursor multiCursor = multiCursor(openAll,
new TestCursor(new int[]{}),
new TestCursor(new int[]{0, 1, 2}),
new TestCursor(new int[]{}),
new TestCursor(new int[]{}),
new TestCursor(new int[]{3}),
new TestCursor(new int[]{}),
new TestCursor(new int[]{}));
multiCursor.open();
Row row;
long expected = 0;
while ((row = multiCursor.next()) != null) {
assertEquals(expected, unwrap(row));
expected++;
}
assertEquals(4, expected);
assertTrue(multiCursor.isIdle());
}