refactor tests - Chapter 7 Exercises