DataContext () { MapDataContext dataContext = new MapDataContext(); dataContext.put(CommonDataKeys.PROJECT, getProject()); int offset = myFixture.getEditor().getCaretModel().getOffset(); PsiElement element = Objects.requireNonNull(myFixture.getFile().findElementAt(offset)); dataContext.put(Location.DATA_KEY, PsiLocation.fromPsiElement(element)); return dataContext; }