refactoring assertion tests