When refactoring do you write tests before?