Use a script template resource.
@param scriptTemplate the scriptTemplate to set
@param charset
511810
public GroovyActionBuilder template(Resource scriptTemplate, Charset charset) {
		try {
            action.setScriptTemplate(FileUtils.readToString(scriptTemplate, charset));
        } catch (IOException e) {
            throw new CitrusRuntimeException("Failed to read script template file", e);
        }
		return this;
	}
901050
public static String template(final String template, final Object root)
	{
		StrSubstitutor substitutor = new StrSubstitutor(newOgnlLookup(root));

		return substitutor.replace(template);
	}
348704
public Template getTemplate(String name, Locale locale, Object args) throws IOException, ParseException {
        if (args instanceof String)
            return getTemplate(name, locale, (String) args);
        return getTemplate(name, locale, null, args);
    }
496611
public Context setTemplate(Template template) {
        checkThread();
        if (template != null) {
            setEngine(template.getEngine());
        }
        this.template = template;
        return this;
    }
503098
public static ThymeleafTemplate wrap(TemplateEngine engine, String template, Charset charset) {
		return (null == engine) ? null : new ThymeleafTemplate(engine, template, charset);
	}
368754
private static String templateToHtml( Template t){
		if( t == null ) {
			return "null";
		}

		StringBuilder result = new StringBuilder();

		result.append(
			"<table class=\"Template\">\n" +
			"<tr><th class=\"Template\">Template</th></tr>\n"+
			"<tr><td class=\"Template\">" +
			"Name: \""+convertTags( t.getName() )+"\"<br>"+
			"</td></tr>\n");

		if( t.getParameters().size() != 0 ){
			result.append("<tr><td class=\"Template\">");
			for( String parameter: t.getParameters() ) {
				result.append("Parameter: \""+convertTags( parameter )+"\"<br>");
			}
			result.append("</td></tr>\n");
		}

		result.append("</table>" );

		return result.toString();
	}
340274
public int delTemplate(String template) {
        int returnCode = NO_EXCEPTION;
        if (!this.disableTemplatesSupport) {
            if (delayOffload) {
                auxTemplateDependencyTable.removeDependency(template);
            }
            returnCode = delValueSet(TEMPLATE_ID_DATA, template);
        }
        return returnCode;
    }
1186636
public static UriTemplate create(String template, boolean encodeSlash, Charset charset) {
    return new UriTemplate(template, encodeSlash, charset);
  }
339939
public static QueryTemplate create(String name,
                                     Iterable<String> values,
                                     Charset charset,
                                     CollectionFormat collectionFormat) {
    if (Util.isBlank(name)) {
      throw new IllegalArgumentException("name is required.");
    }

    if (values == null) {
      throw new IllegalArgumentException("values are required");
    }

    /* remove all empty values from the array */
    Collection<String> remaining = StreamSupport.stream(values.spliterator(), false)
        .filter(Util::isNotBlank)
        .collect(Collectors.toList());

    StringBuilder template = new StringBuilder();
    Iterator<String> iterator = remaining.iterator();
    while (iterator.hasNext()) {
      template.append(iterator.next());
      if (iterator.hasNext()) {
        template.append(COLLECTION_DELIMITER);
      }
    }

    return new QueryTemplate(template.toString(), name, remaining, charset, collectionFormat);
  }
1099061
public function setThemeTemplate($template)
    {
        $this->_themeTemplate = $template;
        if ($this->getTheme() != null) {
            $this->getTheme()->setTemplate($this->_themeTemplate);
        }
    }
145999
public void updateComponentDumpTemplate(String template) throws SecurityException {
	checkWriteAccess();
	boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_SETTING);
	if (!hasAccess) throw new SecurityException("no access to update component setting");

	Element component = _getRootElement("component");
	// if(template.trim().length()>0)
	component.setAttribute("dump-template", template);
    }
959028
public void setCharset(String to) {
    // Validate the character set.
    try {
      new String(new byte[97], to);
    } catch (UnsupportedEncodingException e) {
      throw new RuntimeException(e);
    }
    charset = to;
  }
1248285
public static StringTemplate stringTemplate(String template, List<?> args) {
        return stringTemplate(createTemplate(template), args);
    }
543638
public function setTemplate($template)
    {
        $this->templatePath = $this->getTemplatesDirectory() . '/' . ltrim($template, '/');
        if (!file_exists($this->templatePath)) {
            throw new \RuntimeException('View cannot render template `' . $this->templatePath . '`. Template does not exist.');
        }
    }
1355591
protected File generateTemplate(File template, Instance instance) throws IOException {

		String scriptName = instance.getName().replace( "\\s+", "_" );
		File generated = File.createTempFile( scriptName, ".script");
		InstanceTemplateHelper.injectInstanceImports(instance, template, generated);

		return generated;
	}
567766
@Override
	public Template getTemplate(String resource) {
		return BeetlTemplate.wrap(engine.getTemplate(resource));
	}
828244
public static StringTemplate stringTemplate(Template template, List<?> args) {
        return new StringTemplate(template, ImmutableList.copyOf(args));
    }