PsiClass () { final PsiElement elementAtCaret = myFixture.getElementAtCaret(); assertNotNull(elementAtCaret); final PsiClass psiClass = PsiTreeUtil.getParentOfType(elementAtCaret, PsiClass.class, false); assertTrue(psiClass != null && psiClass.isInterface()); return psiClass; }