void () { MyParentDisposable root = new MyParentDisposable("root"); Disposer.register(root, myFolder1); MyParentDisposable sub = new MyParentDisposable("subFolder"); Disposer.register(myFolder1, sub); Disposer.register(sub, myLeaf1); Disposer.dispose(root); @NonNls String[] expected = {"beforeDispose: root", "beforeDispose: subFolder", "dispose: leaf1", "dispose: subFolder", "dispose: folder1", "dispose: root"}; UsefulTestCase.assertOrderedEquals(myDisposeActions, expected); }