void () { PsiModifierList modifierList = getFieldModifierListAtCaret(); assertFalse("@FieldDefaults(level = AccessLevel.PRIVATE) should not make fields public", modifierList.hasModifierProperty(PsiModifier.PUBLIC)); assertFalse("@FieldDefaults(level = AccessLevel.PRIVATE) should not make fields protected", modifierList.hasModifierProperty(PsiModifier.PROTECTED)); assertFalse("@FieldDefaults(level = AccessLevel.PRIVATE) should not make fields package-private", modifierList.hasModifierProperty(PsiModifier.PACKAGE_LOCAL)); assertTrue("@FieldDefaults(level = AccessLevel.PRIVATE) should make non-@PackagePrivate fields private", modifierList.hasModifierProperty(PsiModifier.PRIVATE)); }