void () { SelDisposable selfDisposable = new SelDisposable("selfDisposable"); Disposer.register(myRoot, selfDisposable); Disposer.register(selfDisposable, myFolder1); Disposer.register(myFolder1, myFolder2); //noinspection SSBasedInspection selfDisposable.dispose(); assertDisposed(selfDisposable); assertDisposed(myFolder1); assertDisposed(myFolder2); }