completed main controller unit tests