Add some tests for main controller