Improved exceptions tests