Unit test for the main controller