Unit test: main controller