Add test for database interaction