void () { FileTemplate template = myTemplateManager.addTemplate("foo", "txt"); CustomFileTemplate child = (CustomFileTemplate)myTemplateManager.addTemplate("foo.txt" + FileTemplateBase.TEMPLATE_CHILDREN_SUFFIX + "1", "txt"); template.setChildren(new FileTemplate[]{child}); myTemplateManager.saveAllTemplates(); FTManager ftManager = ProjectManager.getInstance().getDefaultProject().getService(FileTemplateSettings.class).getDefaultTemplatesManager(); ftManager.getTemplates().clear(); ftManager.loadCustomizedContent(); FileTemplateBase loaded = ftManager.getTemplate("foo.txt"); assertNotNull(loaded); assertEquals(1, loaded.getChildren().length); FileTemplateBase t = ftManager.getTemplate(child.getQualifiedName()); assertNotNull(t); }