void (@NotNull SMTestProxy testProxy, @NotNull TestFailure failure) { var message = ObjectUtils.doIfNotNull(failure, it -> it.getMessage()); var stackTrace = failure.getStackTrace(); var comparisonResult = ObjectUtils.doIfNotNull(message, it -> AssertionParser.parse(it)); if (failure instanceof TestAssertionFailure assertionFailure) { var localizedMessage = comparisonResult == null ? message : comparisonResult.getMessage(); var actualText = assertionFailure.getActualText(); var expectedText = assertionFailure.getExpectedText(); var actualFile = assertionFailure.getActualFile(); var expectedFile = assertionFailure.getExpectedFile(); testProxy.setTestComparisonFailed(localizedMessage, stackTrace, actualText, expectedText, actualFile, expectedFile, true); } else if (comparisonResult != null && failure.getCauses().isEmpty()) { var localizedMessage = comparisonResult.getMessage(); var actualText = comparisonResult.getActual(); var expectedText = comparisonResult.getExpected(); testProxy.setTestComparisonFailed(localizedMessage, stackTrace, actualText, expectedText); } else if (message != null && stackTrace != null && StringUtil.contains(stackTrace, message)) { testProxy.setTestFailed(null, stackTrace, failure.isTestError()); } else { testProxy.setTestFailed(message, stackTrace, failure.isTestError()); } }