Add unit tests to check that instance methods as the error handler work properly.