PsiElement () { final String name = File.separator + getTestName(false) + getFileExtension(); configureByFile(name); final PsiFile file = getFile(); final int offset = getEditor().getCaretModel().getCurrentCaret().getOffset(); final PsiElement elementAtCaret = DebuggerUtilsEx.findElementAt(file, offset); assertNotNull(elementAtCaret); return elementAtCaret; }