Add tests for the database utils
Make the tests pass