### Question:
AbstractSelectionAwareSessionCommand extends AbstractClientSessionCommand<S> { protected boolean onlyCanvasRootSelected(final CanvasSelectionEvent event) { return event.getIdentifiers().size() == 1 && getCanvasHandler().getDiagram().getMetadata().getCanvasRootUUID().equals(event.getIdentifiers().iterator().next()); } AbstractSelectionAwareSessionCommand(final boolean enabled);   }### Answer:
@Test public void testOnlyCanvasRootSelected() { List<String> selectedNodes = new ArrayList<>(); assertFalse(command.onlyCanvasRootSelected(new CanvasSelectionEvent(canvasHandler, selectedNodes))); selectedNodes.clear(); selectedNodes.add("one"); selectedNodes.add("two"); assertFalse(command.onlyCanvasRootSelected(new CanvasSelectionEvent(canvasHandler, selectedNodes))); selectedNodes.clear(); selectedNodes.add("one"); selectedNodes.add(CANVAS_ROOT_ID); assertFalse(command.onlyCanvasRootSelected(new CanvasSelectionEvent(canvasHandler, selectedNodes))); selectedNodes.clear(); selectedNodes.add(CANVAS_ROOT_ID); assertTrue(command.onlyCanvasRootSelected(new CanvasSelectionEvent(canvasHandler, selectedNodes))); }