ElementStub (@TestDataFile String filePath, JavaCodeInsightTestFixture fixture) { PsiFile psiFile = fixture.configureByFile(filePath); StubTreeLoader loader = StubTreeLoader.getInstance(); VirtualFile file = psiFile.getVirtualFile(); assertTrue(loader.canHaveStub(file)); ObjectStubTree stubTree = loader.readFromVFile(fixture.getProject(), file); assertNotNull(stubTree); ElementStub root = (ElementStub)stubTree.getRoot(); assertNotNull(root); return root; }