Refactor test cases.