add db unit test.