### Question:
XMLActions extends AbstractCaller { @Description("The generated XML will available by this reference in field `Content`<br>" + "Example:<br/>" + "#{ref.Content}") @CustomColumns( @CustomColumn(value = TEMPLATE, required = true) ) @ActionMethod public HashMap<?, ?> generateDocument(IActionContext actionContext, HashMap<?, ?> inputData) { inputData = unwrapFilters(inputData); String templateAlias = Objects.requireNonNull((String) inputData.remove(TEMPLATE), "'template' parameter"); IDataManager dataManager = actionContext.getDataManager(); try (InputStream dataInputStream = dataManager.getDataInputStream(SailfishURI.parse(templateAlias))) { StringTemplateLoader stringLoader = new StringTemplateLoader(); stringLoader.putTemplate(TEMPLATE, IOUtils.toString(dataInputStream, StandardCharsets.UTF_8)); Configuration cfg = new Configuration(Configuration.VERSION_2_3_27); cfg.setTemplateLoader(stringLoader); Template temp = cfg.getTemplate(TEMPLATE); try (Writer out = new StringWriter()) { temp.process(inputData, out); HashMap<String, String> result = new HashMap<>(); result.put(OUT, out.toString()); return result; } } catch (Exception e) { throw new EPSCommonException(e); } }  @Description("The generated XML will available by this reference in field `Content`<br>" + "Example:<br/>" + "#{ref.Content}") @CustomColumns( @CustomColumn(value = TEMPLATE, required = true) ) @ActionMethod HashMap<?, ?> generateDocument(IActionContext actionContext, HashMap<?, ?> inputData); static final String TEMPLATE; static final String OUT; }### Answer:
@Test public void test() { HashMap<String, String> settings = new HashMap<>(); settings.put(XMLActions.TEMPLATE, "TestSimpleTemplate"); settings.put("msgType", "AddOrder"); settings.put("valueField", "ToMapping"); HashMap<?, ?> hashMap = xmlActions.generateDocument(actionContext, settings); Assert.assertEquals(getDocument("TestSimpleTemplateFinal"), hashMap.get(XMLActions.OUT)); }