@Test
public void shouldNotMoveAStepIfItUseANotYetCreatedColumn() throws Exception {

    // given
    final String preparationId = createPreparation("1234", "My preparation");
    clientTest.addStep(preparationId, step(null, action("copy", paramsColAction("0001", "lastname"))));
    clientTest.addStep(preparationId, step(null, action("copy", paramsColAction("0001", "lastname"))));
    clientTest.addStep(preparationId, step(null, action("uppercase", paramsColAction("0005", "lastname_copy"))));
    final Preparation preparation = repository.get(preparationId, Preparation.class);
    final List<String> stepIds = preparationUtils.listStepsIds(preparation.getHeadId(), repository);
    assertEquals(4, stepIds.size());
    // when : delete second step in single mode
    given()
            .queryParam("parentStepId", stepIds.get(1))
            .when()
            .post("/preparations/{id}/steps/{stepId}/order", preparationId, stepIds.get(3))//
            // TDP-3624
            .then()
            .statusCode(409);
    final Preparation preparationAfter = repository.get(preparationId, Preparation.class);
    final String newHeadStepId = preparationAfter.getHeadId();
    Step head = repository.get(newHeadStepId, Step.class);
    PreparationActions headActions = repository.get(head.getContent(), PreparationActions.class);
    assertThat(headActions.getActions(), hasSize(3));
    assertThat(headActions.getActions().get(0).getName(), is("copy"));
    assertThat(headActions.getActions().get(1).getName(), is("copy"));
    assertThat(headActions.getActions().get(2).getName(), is("uppercase"));
}