mock tests for TravisCI. Code refactor