refactor test cases.