Improve exception tests