enable CLI tests
separate main logic for the better testability
check retrun value
Merge pull request #345 from recruit-tech/enable-clitests

enable CLI tests separate main logic for the better testability