Add tests to cover reference cursors.