Started to write unit tests for the controller.