void () { Disposer.register(myRoot, myFolder1); Disposer.register(myFolder1, myLeaf1); Disposer.register(myRoot, myFolder2); Disposer.dispose(myRoot); assertEquals(Arrays.asList(myFolder2, myLeaf1, myFolder1, myRoot), myDisposedObjects); }