Refactor Test Case