added tests for controller api