add test for TemplateMethod