void (String text) { Configuration.AdvancedConfiguration configuration = Configuration.getInstance().getAdvancedConfiguration(); Configuration.DfaOption oldOption = configuration.getDfaOption(); try { configuration.setDfaOption(Configuration.DfaOption.DFA); myFixture.configureByText("X.java", text); myFixture.testHighlighting(); } finally { configuration.setDfaOption(oldOption); } }