added a test for template params on a rest resource and corrected a related bug