remove redundant code in tests