Use mocha to do unit test. issue #4
- add db test