Refactoring Test Code