Fixed and extended mocha generator tests

The original tests were not working.
Furthermore, I added .travis.yml to enable Travis CI