Use ITemplateFactory in tests, not TemplateFactory