### Question:
ResizeControlImpl extends AbstractCanvasHandlerRegistrationControl<AbstractCanvasHandler> implements ResizeControl<AbstractCanvasHandler, Element> { @Override @SuppressWarnings("unchecked") public void register(final Element element) { if (checkNotRegistered(element)) { final Canvas<?> canvas = canvasHandler.getCanvas(); final Shape<?> shape = canvas.getShape(element.getUUID()); if (supportsResize(shape)) { registerResizeHandlers(element, shape); } } } protected  ResizeControlImpl(); @Inject  ResizeControlImpl(final CanvasCommandFactory<AbstractCanvasHandler> canvasCommandFactory); @Override @SuppressWarnings("unchecked") void register(final Element element); @Override @SuppressWarnings("unchecked") CommandResult<CanvasViolation> resize(final Element element,
                                                 final double width,
                                                 final double height); @Override void setCommandManagerProvider(final RequiresCommandManager.CommandManagerProvider<AbstractCanvasHandler> provider);  }### Answer:
@Test public void testRegister() { tested.init(canvasHandler); assertFalse(tested.isRegistered(element)); tested.register(element); verify(shapeView, times(1)).supports(eq(ViewEventType.RESIZE)); verify(shapeView, times(1)).addHandler(eq(ViewEventType.RESIZE), any(ResizeHandler.class)); assertTrue(tested.isRegistered(element)); }
@Test @SuppressWarnings("unchecked") public void testDeregister() { tested.init(canvasHandler); tested.register(element); tested.deregister(element); verify(shapeView, times(1)).removeHandler(any(ViewHandler.class)); assertFalse(tested.isRegistered(element)); }