Add test cases and .travis.yml