void () { myFixture.configureByFile(getTestName(false) + ".java"); final PsiFile file = getFile(); final HighlightingSettingsPerFile settingsPerFile = HighlightingSettingsPerFile.getInstance(getProject()); final FileHighlightingSetting oldSetting = settingsPerFile.getHighlightingSettingForRoot(file); try { settingsPerFile.setHighlightingSettingForRoot(file, FileHighlightingSetting.NONE); myFixture.checkHighlighting(true, false, false); } finally { settingsPerFile.setHighlightingSettingForRoot(file, oldSetting); } }