Add some unit tests for the controllers