Updated unit tests for chapter source code