void () { myFixture.configureByFile(getTestName(false) + ".java"); PsiClass calendarClass = myFixture.getJavaFacade().findClass(CommonClassNames.JAVA_UTIL_CALENDAR); assertNotNull("No Calendar class in mockJDK", calendarClass); PsiElement calendarSource = calendarClass.getNavigationElement(); assertTrue(calendarSource instanceof PsiClassImpl); myFixture.allowTreeAccessForFile(calendarSource.getContainingFile().getVirtualFile()); myFixture.enableInspections(new MagicConstantInspection()); myFixture.testHighlighting(true, false, false); }