void () { final PsiAnnotation annotation = getJavaFacade().getElementFactory().createAnnotationFromText("@A({b,c})", null); final PsiNameValuePair firstAttribute = annotation.getParameterList().getAttributes()[0]; assertTrue(firstAttribute.getValue() instanceof PsiArrayInitializerMemberValue); final PsiAnnotationMemberValue firstInitializer = ((PsiArrayInitializerMemberValue)firstAttribute.getValue()).getInitializers()[0]; ApplicationManager.getApplication().runWriteAction(() -> firstInitializer.delete()); assertEquals("@A({ c})", annotation.getText()); }