void () { final PsiMethod method = getPrimaryMethod(); final HashSet<PsiMethod> methods = new HashSet<>(); for (PsiReference reference : ReferencesSearch.search(method)) { final PsiMethod psiMethod = PsiTreeUtil.getParentOfType(reference.getElement(), PsiMethod.class); if (psiMethod != null) { methods.add(psiMethod); } } parameterPropagationTest(method, methods, JavaPsiFacade.getElementFactory(getProject()).createTypeByFQClassName("T")); }