Add unit test for getGeneratedKeys function and modify the tests to start the row resultset index from -1