Added unit tests for controllers