Fix tests, adding mock to error