Refactorin Test Code