added preconditions in TestCase class