refactored Testcase