void () { PsiFile file = myFixture.addFileToProject("Foo.java", """ public abstract class Hello { { Runnable r = () <caret>-> {}; } } """); myFixture.configureFromExistingVirtualFile(file.getVirtualFile()); final PsiElement element = TargetElementUtil.findTargetElement(myFixture.getEditor(), TargetElementUtil.getInstance().getAllAccepted()); assertTrue(element instanceof PsiClass); final String qualifiedName = ((PsiClass)element).getQualifiedName(); assertEquals(CommonClassNames.JAVA_LANG_RUNNABLE, qualifiedName); }