Use mock in unit tests.