void () { PsiClass aClass = getFile("MyClass").getClasses()[0]; PsiModifierList modifierList = aClass.getModifierList(); assertNotNull(modifierList); assertTrue(modifierList.hasModifierProperty(PsiModifier.PUBLIC)); assertFalse(modifierList.hasModifierProperty(PsiModifier.STATIC)); assertEquals(modifierList.getParent(), aClass); PsiField field = aClass.getFields()[0]; modifierList = field.getModifierList(); assertNotNull(modifierList); assertTrue(modifierList.hasModifierProperty(PsiModifier.PACKAGE_LOCAL)); assertEquals(modifierList.getParent(), field); PsiMethod method = aClass.getMethods()[0]; modifierList = method.getModifierList(); assertNotNull(modifierList); assertTrue(modifierList.hasModifierProperty(PsiModifier.PACKAGE_LOCAL)); assertEquals(modifierList.getParent(), method); }