Fix database unit test