Overrides obj.method with a mock function and returns it.
Restores all mocked methods.
Verifies all expectations on the mock. If any expectation is not satisfied, an exception is thrown. Also restores the mocked methods.
Overrides obj.method with a mock function and returns it.