test class refactoring