Add more test cases and fix different scenarios for template params