Add test case.
Port test cases to mocha.