Chapter 7 validations and unit tests