Unit test error handling.