Refactoring test case service