cookbook test code