Refactoing assertions