Better template path resolution in test case