AgnosticTreeView implements TreeView { @Override public void loadCascade(Cascade newCascade, boolean resetView) { clear(); cascade.setDelegate(newCascade); cascade.addTo(polygonPanel); loadListeners.announce().cascadeLoaded(); new DefaultScaler(polygonPanel).scale(); } AgnosticTreeView(PolygonPanel polygonPanel); @Override void addNodeInteractionListener(NodeInteractionListener listener); @Override void colorNode(String nodeId, RGBColor color, RGBColor border); @Override void addCascadeLoadedListener(CascadeLoadedListener listener); @Override void setCanvasBackground(RGBColor color); @Override void loadCascade(Cascade newCascade, boolean resetView); @Override void addSpecialControl(String nodeId, SpecialControl specialControl); @Override void initNodeNames(); @Override void initToolTips(ToolTipProperties properties); @Override void loadNodeNamesFrom(NodePresentationProperties nodePresentationProperties); @Override void clear(); @Override void registerSpecialType(Class contentClass, ContentFactory factory);  }
@Test public void paintsCascadeOnCanvas() throws Exception { treeView.loadCascade(cascade, true); verify(cascade).addTo(panel); }