add some unit tests for controllers