add tests for Database.