Added more tests for Database related code