added database unit test