added tests for database module