### Question:
AggregatedCascade implements Cascade { @Override public void colorNode(String nodeId, RGBColor fillColor) { for (ContainerCascade cascade : cascades) { if (cascade.hasNode(nodeId)) { cascade.colorNode(nodeId, fillColor); } } }  @Override void colorNode(String nodeId, RGBColor fillColor); @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);  }### Answer:
@Test public void forwardsColoringToContainer() throws Exception { when(child.hasNode("X")).thenReturn(true); cascade.colorNode("X", RGBColor.Pink); verify(child).colorNode("X", RGBColor.Pink); }
@Test public void doesNotForwardColoringToDifferentChild() throws Exception { cascade.colorNode("X", RGBColor.Pink); verify(child, never()).colorNode("X", RGBColor.Pink); }