String (TestIdentifier root) { return root.getSource() .map(testSource -> { if (testSource instanceof MethodSource) { //noinspection SpellCheckingInspection return " metainfo='" + ((MethodSource)testSource).getMethodParameterTypes() + "'"; } if (testSource instanceof ClassSource) { //noinspection SpellCheckingInspection return ((ClassSource)testSource).getPosition() .map(position -> " metainfo='" + position.getLine() + ":" + position.getColumn() + "'") .orElse(NO_LOCATION_HINT); } return NO_LOCATION_HINT; }) .orElse(NO_LOCATION_HINT); }