LookupElement (String text) { String fullText = "class F { " + text + " }"; myFixture.configureByText("a.java", fullText); LookupElement var = ContainerUtil.find(myFixture.completeBasic(), it -> it.getLookupString().equals("var")); myFixture.checkResult(fullText); return var; }