Add unit tests for controllers