some unit tests for database