ActionSetFieldColumnSynchronizer extends ActionColumnSynchronizer { @Override public void append(final ColumnMetaData metaData) throws VetoException { if (!handlesAppend(metaData)) { return; } final ActionSetFieldCol52 column = (ActionSetFieldCol52) metaData.getColumn(); final OptionalInt targetIndex = findLastIndexOfActionSetFieldColumn(column); if (targetIndex.isPresent()) { model.getActionCols().add(targetIndex.getAsInt() + 1, column); synchroniseAppendColumn(column); } else { model.getActionCols().add(column); synchroniseAppendColumn(column); } }  @Override int priority(); @Override boolean handlesAppend(final MetaData metaData); @Override void append(final ColumnMetaData metaData); @Override boolean handlesUpdate(final MetaData metaData); @Override List<BaseColumnFieldDiff> update(final ColumnMetaData originalMetaData,
                                            final ColumnMetaData editedMetaData); @Override boolean handlesMoveColumnsTo(final List<? extends MetaData> metaData);  }
@Test public void testAppend() throws VetoException { final Pattern52 pattern = new Pattern52(); pattern.setBoundName("$a"); pattern.setFactType("Applicant"); final ConditionCol52 condition = new ConditionCol52(); condition.setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL); condition.setHeader("col1"); condition.setFactField("age"); condition.setOperator("=="); modelSynchronizer.appendColumn(pattern, condition); final ActionSetFieldCol52 column = new ActionSetFieldCol52(); column.setHeader("col1"); column.setBoundName("$a"); column.setFactField("age"); modelSynchronizer.appendColumn(column); assertEquals(1, model.getConditions().size()); assertEquals(1, model.getActionCols().size()); assertEquals(5, uiModel.getColumns().size()); assertTrue(uiModel.getColumns().get(4) instanceof IntegerUiColumn); assertEquals(true, ((BaseSingletonDOMElementUiColumn) uiModel.getColumns().get(3)).isEditable()); }