### Question:
LienzoLayer { public LienzoLayer add(final IPrimitive<?> shape) { if (layer.getChildNodes().contains(shape)) { LOGGER.log(Level.WARNING, "Cannot add a primitive shape into the layer twice!"); } else { layer.add(shape); } return this; } LienzoLayer();   LienzoLayer(final LienzoCustomLayer layer); void setSkipDraw(final boolean skipDraw); LienzoLayer add(final IPrimitive<?> shape); LienzoLayer delete(final IPrimitive<?> shape); void clear(); void onAfterDraw(final Command callback); Layer getTopLayer(); void add(final Layer layer); boolean isReady(); void remove(final Layer layer); void destroy(); Layer getLienzoLayer(); org.kie.workbench.common.stunner.core.client.canvas.Transform getTransform(); void translate(final double tx,
                          final double ty); void scale(final double sx,
                      final double sy); void scale(final double delta);  }### Answer:
@Test public void testAdd() { tested.add(shape); verify(layer, times(1)).add(eq(shape)); tested.add(emptyLayer); verify(scene, times(1)).add(eq(emptyLayer)); }
@Test public void testAddTwice() { when(layer.getChildNodes()).thenReturn(new NFastArrayList<>(shape)); tested.add(shape); verify(layer, never()).add(eq(shape)); }