void (@NotNull HierarchyTreeStructure treeStructure, @NotNull String expectedStructure, @Nullable Comparator<? super NodeDescriptor<?>> comparator, @Nullable File expectedFile) { Element element; try { element = JDOMUtil.load(expectedStructure); } catch (Throwable e) { String actual = dump(treeStructure, null, comparator, 0); if (!expectedStructure.equals(actual)) { throw new FileComparisonFailure("XML structure comparison for your convenience, actual failure details BELOW", expectedStructure, actual, expectedFile == null ? null : expectedFile.getAbsolutePath()); } throw new RuntimeException(e); } checkHierarchyTreeStructure(treeStructure, element, comparator); }