List<String> () { final List<String> hierarchy; final XmlTest xmlTest = myResult.getTestClass().getXmlTest(); if (xmlTest != null) { hierarchy = Arrays.asList(getClassName(), xmlTest.getName()); } else { hierarchy = Collections.singletonList(getClassName()); } return hierarchy; }