Improve exceptions tests