Add functional test for controller