refactorings for making a test easier to write