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