Fix broken mock in tests