@Test public void testHTMLRender() throws IOException, ParserConfigurationException, SAXException { TreeItem model = TreeModelUtils.prepareTreeModel(FileTreeTest.testDir(), null); StringTemplateGroup parentGroup = BasicStringTemplateGroup.getBasicProcessesGroup(); StringTemplateGroup subGroup = new StringTemplateGroup(new StringReader(TEST_GROUP)); subGroup.setSuperGroup(parentGroup); StringTemplate template = subGroup.getInstanceOf("tree"); template.setAttribute("root", model); Document docs = XMLUtils.parseDocument(new StringReader(template.toString())); List<Element> liElms = new ArrayList<Element>(); NodeList nodelist = docs.getDocumentElement().getChildNodes(); for (int i = 0; i < nodelist.getLength(); i++) { boolean lielm = (nodelist.item(i).getNodeType() == Node.ELEMENT_NODE) && (nodelist.item(i).getNodeName().equals("li")); if (lielm) liElms.add((Element) nodelist.item(i)); } Assert.assertTrue(liElms.size() == FileTreeTest.H_NAMES.length); }
public synchronized static StringTemplateGroup getBasicProcessesGroup() { try { if (BASIC_ST_GROUP == null) { initialization(); } return BASIC_ST_GROUP; } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }
BasicStringTemplateGroup { public synchronized static StringTemplateGroup getBasicProcessesGroup() { try { if (BASIC_ST_GROUP == null) { initialization(); } return BASIC_ST_GROUP; } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } } }
BasicStringTemplateGroup { public synchronized static StringTemplateGroup getBasicProcessesGroup() { try { if (BASIC_ST_GROUP == null) { initialization(); } return BASIC_ST_GROUP; } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }  }
BasicStringTemplateGroup { public synchronized static StringTemplateGroup getBasicProcessesGroup() { try { if (BASIC_ST_GROUP == null) { initialization(); } return BASIC_ST_GROUP; } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }  synchronized static StringTemplateGroup getBasicProcessesGroup(); }
BasicStringTemplateGroup { public synchronized static StringTemplateGroup getBasicProcessesGroup() { try { if (BASIC_ST_GROUP == null) { initialization(); } return BASIC_ST_GROUP; } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }  synchronized static StringTemplateGroup getBasicProcessesGroup();  }