Added a test main function.