refactor test case.