### Question:
ElementProxy implements ShapeProxy { @Override public void start(final double x, final double y) { view .onCreate(this::createProxy) .onAccept(this::acceptProxy) .onDestroy(this::destroyProxy) .setCanvas(getCanvas()) .start(x, y); } @Inject  ElementProxy(final SessionCommandManager<AbstractCanvasHandler> commandManager,
                        final Event<CanvasSelectionEvent> selectionEvent,
                        final @Any ManagedInstance<DefaultCanvasCommandFactory> commandFactories,
                        final DefinitionUtils definitionUtils); @SuppressWarnings("unchecked") ElementProxy setView(final ShapeProxyView<? extends ElementShape> view); ElementProxy setProxyBuilder(final Supplier<ElementShape> proxyBuilder); ElementProxy setCanvasHandler(final AbstractCanvasHandler canvasHandler); @Override void start(final double x,
                      final double y); @Override void destroy(); CommandResult<CanvasViolation> execute(final Command<AbstractCanvasHandler, CanvasViolation> command); Canvas getCanvas(); AbstractCanvasHandler getCanvasHandler();  }### Answer:
@Test public void testStart() { double x = 15d; double y = 1.5d; tested.start(x, y); verify(view, times(1)).setCanvas(eq(canvas)); verify(view, times(1)).onCreate(any()); verify(view, times(1)).onAccept(any()); verify(view, times(1)).onDestroy(any()); verify(view, times(1)).start(eq(x), eq(y)); }
@Test public void testShapeBuilder() { tested.start(1, 2); ElementShape shape = view.getShapeBuilder().get(); assertEquals(proxyShape, shape); verify(proxyShape, times(1)).applyState(eq(ShapeState.SELECTED)); verify(commandManager, times(1)).start(); verify(commandManager, never()).rollback(); verify(commandManager, never()).complete(); }
@Test public void testShapeDestroyer() { tested.start(1, 2); view.getShapeDestroyer().accept(proxyShape); InOrder cmOrder = inOrder(commandManager); cmOrder.verify(commandManager, times(1)).rollback(); cmOrder.verify(commandManager, times(1)).complete(); verify(commandManager, never()).start(); }