Test refactoring