Added tests for main.