private void doTest(/*@Language("BNF")*/ String text, /*@Language("BNF")*/ String expected) throws IOException {
myFixture.configureByText("a.bnf", text);
IntentionAction action = new BnfFlipChoiceIntention();
assertTrue("intention not available", action.isAvailable(getProject(), myFixture.getEditor(), myFixture.getFile()));
action.invoke(getProject(), myFixture.getEditor(), myFixture.getFile());
assertSameLines(expected, myFixture.getFile().getText());
}
}