public static void invokeLater(final Project p, final ModalityState state, final Runnable r) {
    startTestRunnable(r);
    ApplicationManager.getApplication().invokeLater(() -> {
      runAndFinishTestRunnable(r);
    }, state, p.getDisposed());
  }
public static void invokeLater(final Project p, final ModalityState state, final Runnable r)