Remove unused code in Mock