Refactored ErrorHandling unit tests.