Added TemplatesApi unit tests