Test code for cookbook