Added unit test for template registration