Remove redundancy in tests