void () { UnindexedFilesScanner t1 = createScanningTask(iter1, "reason 1", ScanningType.PARTIAL); UnindexedFilesScannerExecutor executor = new UnindexedFilesScannerExecutor(getProject()); DumbModeTask dumb1 = executor.wrapAsDumbTask(t1); // Disposer.isDisposed() deprecated. Use checkedDisposable instead CheckedDisposable checked = Disposer.newCheckedDisposable(); Disposer.register(t1, checked); assertFalse(checked.isDisposed()); Disposer.dispose(dumb1); assertTrue(checked.isDisposed()); }