I'm not entirely agree to using for loop, since we won't know the error happens in which value of the loop variable.

Calling a shared helper sounds good, I think this is better since the tests are mostly near duplicates.

I will change this to a shared helper.