Added a test for database code