Modify test according to implementation change

Also add travis.yml in order to avoid test failure at travis CI.