void () { final PsiAnnotation annotation = getJavaFacade().getElementFactory().createAnnotationFromText("@A(b,c)", null); final PsiNameValuePair secondAttribute = annotation.getParameterList().getAttributes()[1]; ApplicationManager.getApplication().runWriteAction(() -> secondAttribute.delete()); assertEquals("@A(b )", annotation.getText()); }