Personally I would think just doing this in the next for loop instead would be cleaner.  This is for a test so ensuring internal configuration in light of an exception shouldn't matter as much.