refactor testcase.