Adding error handling tests.