Add a test for metadata cursors, and a bit more implementation.