Test errors correctly