add unit tests
Merge pull request #1 from Yujun-Qian/master

add unit tests