void () { PsiModifierList modifierList = getFieldModifierListAtCaret(); assertFalse("@FieldDefaults should not touch fields with explicit modifier", modifierList.hasModifierProperty(PsiModifier.PUBLIC)); assertTrue("@FieldDefaults should keep explicit modifier intact", modifierList.hasModifierProperty(PsiModifier.PROTECTED)); }