doTest(expected, text, null);
}
private void doTest(/*@Language("BNF")*/ String expected, /*@Language("BNF")*/ String text, @Nullable Function<List<BnfExpression>, BnfExpression> popupHandler) throws IOException {
myFixture.configureByText("a.bnf", text);
new BnfIntroduceRuleHandler(popupHandler).invoke(getProject(), myFixture.getEditor(), myFixture.getFile(), null);
assertSameLines(expected, myFixture.getFile().getText());
}