added tests for controller