### Question:
WiresLayer extends LienzoLayer { public LienzoLayer add(final WiresShape wiresShape) { if (contains(wiresShape)) { LOGGER.log(Level.WARNING, "Cannot add a WiresShape into the WiresLayer twice!"); } else { wiresManager.register(wiresShape); wiresManager.getMagnetManager().createMagnets(wiresShape, MAGNET_CARDINALS); WiresUtils.assertShapeGroup(wiresShape.getGroup(), WiresCanvas.WIRES_CANVAS_GROUP_ID); } return this; }  WiresLayer use(final WiresManager wiresManager); LienzoLayer add(final WiresShape wiresShape); LienzoLayer add(final WiresConnector wiresConnector); LienzoLayer delete(final WiresShape wiresShape); LienzoLayer delete(final WiresConnector wiresConnector); WiresLayer addChild(final WiresContainer parent,
                               final WiresShape child); WiresLayer deleteChild(final WiresContainer parent,
                                  final WiresShape child); WiresLayer dock(final WiresContainer parent,
                           final WiresShape child); WiresLayer undock(final WiresShape child); WiresManager getWiresManager(); @Override void destroy();  }### Answer:
@Test public void testAddShape() { tested.add(shape); verify(wiresManager, times(1)).register(eq(shape)); verify(magnetManager, times(1)).createMagnets(eq(shape), eq(WiresLayer.MAGNET_CARDINALS)); }
@Test public void testAddShapeTwice() { when(wiresManager.getShape(eq(SHAPE_UUID))).thenReturn(shape); tested.add(shape); verify(wiresManager, never()).register(eq(shape)); verify(magnetManager, never()).createMagnets(eq(shape), eq(WiresLayer.MAGNET_CARDINALS)); }
@Test public void testAddconnector() { tested.add(connector); verify(wiresManager, times(1)).register(eq(connector)); }