void () { PsiFile file = PsiFileFactory.getInstance(getProject()).createFileFromText("a.xxx", MockLanguageFileType.INSTANCE, "aaa a<caret>", 0, true); myFixture.configureFromExistingVirtualFile(file.getViewProvider().getVirtualFile()); myFixture.complete(CompletionType.BASIC); myFixture.checkResult("aaa aaa<caret>"); }