void (@NotNull Environment env) { env.logMessage(toString()); WriteCommandAction.runWriteCommandAction(getProject(), () -> { Document document = getDocument(); try { new ExpectedHighlightingData(document, true, true, true, true).init(); } catch (AssertionError ignore) { // can fail on unpaired markups } for (String s : MARKUP) { removeMarkup(document, s); } }); PsiTestUtil.checkPsiStructureWithCommit(getFile(), PsiTestUtil::checkStubsMatchText); }