String (TestIdentifier testIdentifier) { String displayName = testIdentifier.getDisplayName(); return testIdentifier.getSource() .map(s -> { if (s instanceof ClassSource) { String className = ((ClassSource)s).getClassName(); if (className.equals(TestSuite.class.getName()) || className.equals(displayName)) { //class level failure return displayName; } String withDisplayName = "." + displayName; return className.endsWith(withDisplayName) ? className : className + withDisplayName; } return s instanceof MethodSource ? ((MethodSource)s).getClassName() + "." + displayName : null; }).orElse(displayName); }