Test case for failWithError.