@Test
public void testAsyncWithProgressNonUi() throws Exception {

  StudioProgressRunner runner = new StudioProgressRunner(false, false, "test", null);
  Semaphore lock = new Semaphore(1);
  lock.acquire();
  ProgressRunner.ProgressRunnable runnable = (indicator, runner1) -> {
    assertFalse(ApplicationManager.getApplication().isDispatchThread());
    try {
      lock.acquire();
    }
    catch (InterruptedException e) {
      fail();
    }
  };
  runner.runAsyncWithProgress(runnable, true);
  lock.release();
}