add unittest. update travis and coverall settings.