Test code for the controller