Add tests from chapter 6