public static void runWhenInitialized(@NotNull Project project, @NotNull Runnable runnable) {
    if (project.isDisposed()) {
      return;
    }

    if (project.isInitialized()) {
      runDumbAware(project, runnable);
    }
    else {
      startTestRunnable(runnable);
      StartupManager.getInstance(project).runAfterOpened(() -> runAndFinishTestRunnable(runnable));
    }
  }
public static void runWhenInitialized(@NotNull Project project, @NotNull Runnable runnable)