void () { PsiFile file = myFixture.configureByFile(getTestName(false) + ".java"); PsiField field = PsiTreeUtil.getParentOfType(file.findElementAt(myFixture.getCaretOffset()), PsiField.class); assertNotNull(field); assertNotNull(field.getModifierList()); assertTrue("@Value should make variable final", field.getModifierList().hasModifierProperty(PsiModifier.FINAL)); assertTrue("@Value should make variable private", field.getModifierList().hasModifierProperty(PsiModifier.PRIVATE)); PsiClass clazz = PsiTreeUtil.getParentOfType(field, PsiClass.class); assertNotNull(clazz); PsiModifierList list = clazz.getModifierList(); assertNotNull(list); assertTrue("@Value should make class final", list.hasModifierProperty(PsiModifier.FINAL)); assertFalse("@Value should not make class private", list.hasModifierProperty(PsiModifier.PRIVATE)); assertFalse("@Value should not make class static", list.hasModifierProperty(PsiModifier.STATIC)); }