test method refactoring