Fixed #23289 -- Added mock as a test dependency.

I understand your concern and I'm not convinced either. Maybe the decision would be easier to take after evaluating the probable number of uses of mock.