void () { DefaultLogger.disableStderrDumping(getTestRootDisposable()); assertThrows(IllegalStateException.class, () -> { ProgressIndicator indicator = new StandardProgressIndicatorBase(); assertFalse(indicator.isRunning()); indicator.start(); assertTrue(indicator.isRunning()); indicator.start(); }); assertThrows(IllegalStateException.class, () -> { ProgressIndicator indicator = new StandardProgressIndicatorBase(); assertFalse(indicator.isRunning()); indicator.start(); assertTrue(indicator.isRunning()); indicator.cancel(); indicator.start(); }); ProgressIndicator indicator = new AbstractProgressIndicatorBase(){ @Override protected boolean isReuseable() { return true; } }; indicator.start(); assertTrue(indicator.isRunning()); indicator.stop(); assertFalse(indicator.isRunning()); indicator.start(); assertTrue(indicator.isRunning()); }