Added TemplatesApi unit tests

Restore the type in the assertion message.