AggregatedCascade implements Cascade { @Override public void removeToggleListener(NodeToggleListener listener) { for (Cascade cascade : cascades) { cascade.removeToggleListener(listener); } }  @Override void colorNode(String nodeId, RGBColor fillColor, RGBColor borderColor); @Override void addTo(PolygonPanel panel); @Override void addToggleListener(NodeToggleListener listener); @Override void removeToggleListener(NodeToggleListener listener); @Override void initNodeNames(NodePresentationProperties properties); @Override void determinePositionFor(String nodeId, ShapeWithPosition control); void add(ContainerCascade cascade);  }
@Test public void removesListenersFromAllChildren() throws Exception { NodeToggleListener listener = mock(NodeToggleListener.class); cascade.removeToggleListener(listener); verify(child).removeToggleListener(listener); }