void () { Disposable parent = new MyLoggingDisposable("parent"); List<Disposable> children = new ArrayList<>(); for (int i = 0; i < ObjectNode.REASONABLY_BIG * 2; i++) { Disposable child = new MyLoggingDisposable("child #" + i); Disposer.register(parent, child); children.add(child); } Disposer.dispose(parent); for (Disposable child : children) { assertTrue(Disposer.isDisposed(child)); } }