Unit test for dynamic template name resolution