Add test to main function