testcase refactoring