Tests refactoring for check Travis error