Updated test case to use cursors.