Refactoring for Tests