Added unit test for template