fix unittest and add travis-ci support