TestCaseGenerator refactored