void () { String attributes = "attr1=\"value1\" arre2=\"value2\""; final String tagPresentation = "a " + attributes; final String tagText = "<" + tagPresentation + "/>"; XmlTag xmlTag = XmlElementFactory.getInstance(getProject()).createTagFromText(tagText); final XmlTagTreeElement treeElement = new XmlTagTreeElement(xmlTag); assertEquals(xmlTag.getName(), treeElement.getPresentableText()); assertEquals(attributes, treeElement.getLocationString()); }