Fix typo handling exceptions from tests