void (final Project p, final ModalityState state, @NotNull Runnable r) { startTestRunnable(r); ApplicationManager.getApplication().invokeAndWait(DisposeAwareRunnable.create(() -> runAndFinishTestRunnable(r), p), state); }