### Question:
SVGStyleTranslator { static Collection<String> parseElementSelectors(final Element element) { final List<String> result = new LinkedList<>(); final String cssClassRaw = getStyleDeclaration(element); if (!isEmpty(cssClassRaw)) { Arrays.stream(cssClassRaw.split(PATTERN_CLASSNAME_SEPARATOR)) .map(c -> "." + c) .forEach(result::add); } final String id = element.getAttribute(ID); if (!isEmpty(id)) { result.add("#" + id); } return result; } 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 testParseElementSelectorsForElement() { Collection<String> selectors = SVGStyleTranslator.parseElementSelectors(element); assertNotNull(selectors); assertEquals(3, selectors.size()); assertTrue(selectors.contains("#" + ID_ELEMENT)); assertTrue(selectors.contains(".ce1")); assertTrue(selectors.contains(".ce2")); }
@Test public void testParseElementSelectorsForParent() { Collection<String> selectors = SVGStyleTranslator.parseElementSelectors(parent); assertNotNull(selectors); assertEquals(3, selectors.size()); assertTrue(selectors.contains("#" + ID_PARENT)); assertTrue(selectors.contains(".cp1")); assertTrue(selectors.contains(".cp2")); }
@Test public void testParseElementSelectorsForRoot() { Collection<String> selectors = SVGStyleTranslator.parseElementSelectors(root); assertNotNull(selectors); assertEquals(3, selectors.size()); assertTrue(selectors.contains("#" + ID_ROOT)); assertTrue(selectors.contains(".cr1")); assertTrue(selectors.contains(".cr2")); }