### Question:
DeleteRuleAnnotationClauseCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                                             VetoUndoCommand { int getRuleAnnotationClauseIndex() { return getUiColumnIndex() - DecisionTableUIModelMapperHelper.ROW_INDEX_COLUMN_COUNT - getDecisionTable().getInput().size() - getDecisionTable().getOutput().size(); } DeleteRuleAnnotationClauseCommand(final DecisionTable decisionTable,
                                             final GridData uiModel,
                                             final int uiColumnIndex,
                                             final DecisionTableUIModelMapper uiModelMapper,
                                             final org.uberfire.mvp.Command executeCanvasOperation,
                                             final org.uberfire.mvp.Command undoCanvasOperation); void updateParentInformation();  }### Answer:
@Test public void testGetRuleAnnotationClauseIndex() { final int columnIndex = 15; final int inputSize = 2; final int outputSize = 5; final List input = mock(List.class); final List output = mock(List.class); final DeleteRuleAnnotationClauseCommand deleteCommand = mock(DeleteRuleAnnotationClauseCommand.class); doCallRealMethod().when(deleteCommand).getRuleAnnotationClauseIndex(); when(deleteCommand.getDecisionTable()).thenReturn(decisionTable); when(deleteCommand.getUiColumnIndex()).thenReturn(columnIndex); when(input.size()).thenReturn(inputSize); when(output.size()).thenReturn(outputSize); when(decisionTable.getInput()).thenReturn(input); when(decisionTable.getOutput()).thenReturn(output); final int expected = columnIndex - DecisionTableUIModelMapperHelper.ROW_INDEX_COLUMN_COUNT - inputSize - outputSize; final int actual = deleteCommand.getRuleAnnotationClauseIndex(); assertEquals(expected, actual); }