### Question:
ContextGridData extends DelegatingGridData { @Override public void moveRowTo(final int index, final GridRow row) { moveRowsTo(index, Collections.singletonList(row)); } ContextGridData(final DMNGridData delegate,
                           final SessionManager sessionManager,
                           final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                           final Supplier<Optional<Context>> expression,
                           final Command canvasOperation); @Override void moveRowTo(final int index,
                          final GridRow row); @Override void moveRowsTo(final int index,
                           final List<GridRow> rows);  }### Answer:
@Test public void testMoveRowToPermitted() { doReturn(GraphCommandResultBuilder.SUCCESS).when(sessionCommandManager).allow(eq(canvasHandler), any(MoveRowsCommand.class)); uiModel.moveRowTo(0, gridRow); verify(sessionCommandManager).execute(eq(canvasHandler), any(MoveRowsCommand.class)); }
@Test public void testMoveRowToNotPermitted() { doReturn(GraphCommandResultBuilder.failed()).when(sessionCommandManager).allow(eq(canvasHandler), any(MoveRowsCommand.class)); uiModel.moveRowTo(0, gridRow); verify(sessionCommandManager, never()).execute(any(AbstractCanvasHandler.class), any(MoveRowsCommand.class)); }