Test refactoring: test and console