void () { myFixture.configureByFiles("Foo.java"); rebuildProject(); List<PsiFunctionalExpression> funExpressions = getFunExpressionsFor(myFixture.getJavaFacade().findClass(CommonClassNames.JAVA_LANG_RUNNABLE)) .getHierarchyChildren() .map(PsiFunctionalExpression.class::cast) .collect(Collectors.toList()); assertSize(6, funExpressions); Set<String> funTypeNames = funExpressions .stream() .map(PsiElement::getParent) .map(PsiVariable.class::cast) .map(PsiVariable::getType) .map(PsiUtil::resolveClassInType) .filter(Objects::nonNull) .map(PsiClass::getQualifiedName) .collect(Collectors.toSet()); String funTypeName = assertOneElement(funTypeNames); assertEquals(CommonClassNames.JAVA_LANG_RUNNABLE, funTypeName); }