Refactor test refactoring