Resource<URL> templateResource = resourceFactory.create(getClass().getResource("EndpointWithDTO.jv"));
Template processor = templateFactory.create(templateResource, FreemarkerTemplate.class);
String output = processor.process(map);
JavaClassSource resource = Roaster.parse(JavaClassSource.class, output);
resource.addImport(rootDto.getQualifiedName());
resource.addImport(entity.getQualifiedName());
resource.setPackage(context.getTargetPackageName());
result.add(resource);
result.addAll(createdDtos.allResources());