Add test for templates

For test #35 and #58