VirtualFile (@Nullable String rootPath, boolean addProjectRoots) { Path dir = temporaryDirectory.newPath(); try { Files.createDirectories(dir); } catch (IOException e) { throw new UncheckedIOException(e); } VirtualFile result = HeavyTestHelper.createTestProjectStructure(myModule, rootPath, dir, addProjectRoots); PsiDocumentManager.getInstance(myProject).commitAllDocuments(); return result; }