{
String templateContents = "Hello ${name}!";
String expected = "Hello JBoss Forge!";
File tempFile = File.createTempFile("template", ".tmp");
tempFile.deleteOnExit();
FileResource resource = resourceFactory.create(tempFile).reify(FileResource.class);
resource.setContents(templateContents);
Template template = templateFactory.create(resource, FreemarkerTemplate.class);
JavaBean dataModel = new JavaBean();
dataModel.setName("JBoss Forge");
String actual = template.process(dataModel);
Assert.assertEquals(expected, actual);