added Factory dependency to TemplateTest