Add prepare database unit test