### Question:
SVGStyleTranslator { static List<Element> getElementsTree(final Element element) { final List<Element> tree = new LinkedList<>(); tree.add(element); Node parent = element.getParentNode(); while (null != parent) { if (parent instanceof Element) { tree.add((Element) parent); } parent = parent.getParentNode(); } return tree; } private  SVGStyleTranslator(); static TransformDefinition parseTransformDefinition(final Element element); static StyleSheetDefinition parseStyleSheetDefinition(final String cssPath,
                                                                 final InputStream cssStream); static StyleDefinition parseStyleDefinition(final Element element,
                                                       final String svgId,
                                                       final StyleSheetDefinition styleSheetDefinition); static String[] getClassNames(final Element element); static final String ID; static final String OPACITY; static final String FILL; static final String FILL_OPACITY; static final String STROKE; static final String STROKE_OPACITY; static final String STROKE_WIDTH; static final String FONT_FAMILY; static final String STROKE_DASHARRAY; static final String FONT_SIZE; static final String STYLE; static final String CSS_CLASS; static final String TRANSFORM; static final String ATTR_VALUE_NONE; static final String[] ATTR_NAMES; }### Answer:
@Test public void testGetParentsTree() { List<Element> tree = SVGStyleTranslator.getElementsTree(element); assertNotNull(tree); assertEquals(3, tree.size()); assertEquals(element, tree.get(0)); assertEquals(parent, tree.get(1)); assertEquals(root, tree.get(2)); }