Add unit test for the main_controller