refactored TestCase.