Ensure tests expect specific error class