testcase refact