Proper test of error raising