Fix mock calls to success() and error().