VirtualFile () { cd(getProjectRoot()); String externalName = "external"; mkdir(externalName); getProjectRoot().refresh(false, true); final VirtualFile repositoryFile = Objects.requireNonNull(this.getProjectRoot().findChild(externalName)); MockRepositoryImpl externalRepo = new MockRepositoryImpl(myProject, repositoryFile, myProject); VcsRepositoryManager.getInstance(myProject).addExternalRepository(repositoryFile, externalRepo); return repositoryFile; }