Refactoring: tests