void (@NonNls String text) { myFixture.configureByText("X.java", text); final ClassHasNoToStringMethodInspection inspection = new ClassHasNoToStringMethodInspection(); inspection.excludeInnerClasses = true; myFixture.enableInspections(inspection); myFixture.testHighlighting(true, false, false); }