Added unit tests for util.template()