// the page will render just <script> element with url to the template
// this will register it in the application's ResourceReferenceRegistry
Page page = tester.startPage(new TemplateResourceReferencePage());
// make a separate request to the template resource
CharSequence urlForTemplate = page.urlFor(new PackageResourceReference(
TextTemplateResourceReferenceTest.class, TEMPLATE_NAME), null);
tester.executeUrl(urlForTemplate.toString());
tester.assertContains("TMPL_START\\|" + EXPECTED_VALUE + "\\|TMPL_END");
}