Test for cursor.forEach