@Test
public void renameCreatedColumns_reorderCorrectlyColumnIdsAndUpdateRefs() throws Exception {

    List<AppendStep> steps = new ArrayList<>();
    AppendStep firstStep = createAppendStep("0002", singletonList("0004"));
    steps.add(firstStep);
    AppendStep secondStep = createAppendStep("0002", singletonList("0003"));
    steps.add(secondStep);
    AppendStep thirdStep = createAppendStep("0003", emptyList());
    steps.add(thirdStep);
    reorderStepsUtils.renameCreatedColumns(steps);
    assertEquals("0003", firstStep.getDiff().getCreatedColumns().iterator().next());
    assertEquals("0004", secondStep.getDiff().getCreatedColumns().iterator().next());
    assertEquals("0004",
            thirdStep.getActions().iterator().next().getParameters().get(ImplicitParameters.COLUMN_ID.getKey()));
}