@Test public void getActionCreatedColumns_should_cleanup_transformation_context() throws Exception { RowMetadata workingMetadata = new RowMetadata(); workingMetadata.addColumn(createColumnNamed("do")); doAnswer(answer(emptyList(), emptyList(), firstActionStuffInActionContext)) .when(firstRowAction) .compile(any(ActionContext.class) ); doAnswer(answer(emptyList(), emptyList(), secondActionStuffInActionContext)) .when(secondRowAction) .compile(any(ActionContext.class) ); onActionsGenerator.computeCreatedColumns(newArrayList(firstAction, secondAction), workingMetadata); verify(firstActionStuffInActionContext).destroy(); verify(secondActionStuffInActionContext).destroy(); }
public StepDiff computeCreatedColumns(final RowMetadata metadata, List<RunnableAction> currentActions, List<RunnableAction> newActions) { RowMetadata workingMetadata = compileActionsOnMetadata(currentActions, metadata); return computeCreatedColumns(newActions, workingMetadata); }
MetadataChangesOnActionsGenerator { public StepDiff computeCreatedColumns(final RowMetadata metadata, List<RunnableAction> currentActions, List<RunnableAction> newActions) { RowMetadata workingMetadata = compileActionsOnMetadata(currentActions, metadata); return computeCreatedColumns(newActions, workingMetadata); } }
MetadataChangesOnActionsGenerator { public StepDiff computeCreatedColumns(final RowMetadata metadata, List<RunnableAction> currentActions, List<RunnableAction> newActions) { RowMetadata workingMetadata = compileActionsOnMetadata(currentActions, metadata); return computeCreatedColumns(newActions, workingMetadata); }  }
MetadataChangesOnActionsGenerator { public StepDiff computeCreatedColumns(final RowMetadata metadata, List<RunnableAction> currentActions, List<RunnableAction> newActions) { RowMetadata workingMetadata = compileActionsOnMetadata(currentActions, metadata); return computeCreatedColumns(newActions, workingMetadata); }  StepDiff computeCreatedColumns(final RowMetadata metadata, List<RunnableAction> currentActions,
            List<RunnableAction> newActions); }
MetadataChangesOnActionsGenerator { public StepDiff computeCreatedColumns(final RowMetadata metadata, List<RunnableAction> currentActions, List<RunnableAction> newActions) { RowMetadata workingMetadata = compileActionsOnMetadata(currentActions, metadata); return computeCreatedColumns(newActions, workingMetadata); }  StepDiff computeCreatedColumns(final RowMetadata metadata, List<RunnableAction> currentActions,
            List<RunnableAction> newActions);  }