Added tests for the controller