Remove unused code in tests