Completed tests for MainController