void () { Disposable disposable = Disposer.newDisposable(); try { ProgressManager.getInstance(); assertNotNull(ProgressManager.getInstanceOrNull()); MockApplication application = new MockApplication(disposable); ApplicationManager.setApplication(application, disposable); assertNull(ProgressManager.getInstanceOrNull()); } finally { Disposer.dispose(disposable); } }