Adding tests for main.