Test case refactor