Remove redundant code in test.