void () { final RedundantCastInspection castInspection = new RedundantCastInspection(); castInspection.IGNORE_SUSPICIOUS_METHOD_CALLS = true; myFixture.enableInspections(castInspection); myFixture.testHighlighting(getTestName(false) + ".java"); }