### Question:
LienzoSelectionControl extends AbstractSelectionControl<H> { void singleSelect(final Element element) { if (!getSelectedItems().isEmpty()) { clearSelection(); } select(element.getUUID()); } @Inject  LienzoSelectionControl(final Event<CanvasSelectionEvent> canvasSelectionEvent,
                                  final Event<CanvasClearSelectionEvent> clearSelectionEvent);   LienzoSelectionControl(final MapSelectionControl<H> selectionControl,
                           final Event<CanvasSelectionEvent> canvasSelectionEvent,
                           final Event<CanvasClearSelectionEvent> clearSelectionEvent);   }### Answer:
@Test public void testSelectionIsSingle() { when(selectionControl.getSelectedItems()).thenReturn(Collections.singletonList(ELEMENT_UUID)); tested.init(canvasHandler); tested.register(element); tested.singleSelect(element); verify(selectionControl, times(1)).clearSelection(); verify(selectionControl, times(1)).select(eq(element.getUUID())); }
@Test public void testClearSelection() { tested.init(canvasHandler); tested.register(element); tested.singleSelect(element); tested.clearSelection(); verify(selectionControl, times(1)).clearSelection(); }