void () { FileTemplate template = myTemplateManager.getTemplate(TEST_TEMPLATE_TXT); CustomFileTemplate child = new CustomFileTemplate("child", "txt"); child.setFileName("child"); template.setChildren(new FileTemplate[]{child}); FileTemplateSettings settings = ApplicationManager.getApplication().getService(ExportableFileTemplateSettings.class); Element state = settings.getState(); assertNotNull(state); Element element = state.getChildren().get(0).getChildren().get(0); assertEquals(""" <template name="testTemplate.txt" reformat="true" live-template-enabled="false" enabled="true"> <template name="child.txt" file-name="child" reformat="true" live-template-enabled="false" /> </template>""", JDOMUtil.writeElement(element)); }