Replace deprecated `mock` with `double`