void (@NotNull GlobalInspectionContextImpl context, boolean checkRange, @NotNull String testDir, @NotNull Collection<? extends InspectionToolWrapper<?,?>> toolWrappers) { final Element root = new Element(GlobalInspectionContextBase.PROBLEMS_TAG_NAME); for (InspectionToolWrapper<?,?> toolWrapper : toolWrappers) { InspectionToolPresentation presentation = context.getPresentation(toolWrapper); presentation.updateContent(); //e.g. dead code need check for reachables presentation.exportResults(p -> root.addContent(p), x -> false, x -> false); } try { File file = new File(testDir + "/expected.xml"); compareWithExpected(JDOMUtil.load(file), root, checkRange); } catch (Exception e) { throw new RuntimeException(e); } }