add some unit test cases in chapter 5