Test helpers refactoring