### Question:
CanvasHighlight { public void destroy() { setValidCursor(); this.uuids.clear(); this.canvasHandler = null; } CanvasHighlight(); CanvasHighlight setCanvasHandler(final AbstractCanvasHandler canvasHandler); CanvasHighlight highLight(final Element<?> node); CanvasHighlight invalid(final Element<?> node); CanvasHighlight invalid(final RuleViolations violations); CanvasHighlight invalid(final Iterable<? extends RuleViolation> violations); CanvasHighlight none(final Element<?> node); CanvasHighlight unhighLight(); void destroy();  }### Answer:
@Test public void testDestroy() { tested.highLight(node1); tested.invalid(node2); tested.destroy(); verify(shape1, times(1)).applyState(eq(ShapeState.HIGHLIGHT)); verify(shape1, times(0)).applyState(eq(ShapeState.NONE)); verify(shape2, times(1)).applyState(eq(ShapeState.INVALID)); verify(shape2, times(0)).applyState(eq(ShapeState.NONE)); verify(canvasView, atLeastOnce()).setCursor(eq(AbstractCanvas.Cursors.DEFAULT)); }