void () { final PsiTypeParameter typeParameter = getTypeParameter(); final PsiReferenceList extendsList = typeParameter.getExtendsList(); final PsiClass cloneableClass = getJavaFacade().findClass(CommonClassNames.JAVA_LANG_RUNNABLE); assertNotNull(cloneableClass); final PsiJavaCodeReferenceElement reference = getJavaFacade().getElementFactory().createClassReferenceElement(cloneableClass); ApplicationManager.getApplication().runWriteAction(() -> { extendsList.add(reference); }); check(); }