void (boolean checkNotNull) { boolean oldNotNull = myInspection.checkNotNull; try { myInspection.checkNotNull = checkNotNull; myFixture.configureByFile(getTestName(false) + ".java"); myFixture.testHighlighting(true, true, false); } finally { myInspection.checkNotNull = oldNotNull; } }