Add test for invalid cursors