add some tests for controller