void (@NotNull String expectedFile, @NotNull String actual) { String actualText = replaceEnvironmentDependentContent(actual); File htmlPath = new File(expectedFile); String expectedText = loadFile(htmlPath); if (!StringUtil.equals(expectedText, actualText)) { String message = "Text mismatch in file: " + htmlPath.getName(); throw new FileComparisonFailure(message, expectedText, actualText, FileUtil.toSystemIndependentName(htmlPath.getPath())); } }