Test case for clearTemplate

This is built ontop of #70