Remove redundant code in testcase