add testing framework for chapter4