Added TemplatesApi unit tests

Non static methods shouldn't set static variables. Make the `readBody` method non static.