void () { doTestTreeStructure(model -> { final TreeElement[] children = model.getRoot().getChildren(); assertSize(6, children); final ItemPresentation booleanNode = children[0].getPresentation(); assertEquals("boolean", booleanNode.getPresentableText()); assertEquals("true", booleanNode.getLocationString()); final ItemPresentation nullNode = children[1].getPresentation(); assertEquals("nullable", nullNode.getPresentableText()); assertEquals("null", nullNode.getLocationString()); final ItemPresentation numNode = children[2].getPresentation(); assertEquals("number", numNode.getPresentableText()); assertEquals("42", numNode.getLocationString()); final ItemPresentation stringNode = children[3].getPresentation(); assertEquals("string", stringNode.getPresentableText()); assertEquals("\"foo\"", stringNode.getLocationString()); final ItemPresentation arrayNode = children[4].getPresentation(); assertEquals("array", arrayNode.getPresentableText()); assertNull(arrayNode.getLocationString()); final ItemPresentation objectNode = children[5].getPresentation(); assertEquals("object", objectNode.getPresentableText()); assertNull(objectNode.getLocationString()); final TreeElement[] nestedChildren = children[5].getChildren(); assertSize(1, nestedChildren); final ItemPresentation subStringNode = nestedChildren[0].getPresentation(); assertEquals("foo", subStringNode.getPresentableText()); assertEquals("\"bar\"", subStringNode.getLocationString()); }); }