AggregatedCascade implements Cascade { @Override public void addTo(PolygonPanel panel) { for (Cascade cascade : cascades) { cascade.addTo(panel); } }  @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 addsAllChildrenToPanel() throws Exception { PolygonPanel panel = mock(PolygonPanel.class); cascade.addTo(panel); verify(child).addTo(panel); }