@Test
public void shouldAddMultipleActionStepAfterHead() throws Exception {

    // given
    final String preparationId = createPreparation("1234", "my preparation");
    Preparation preparation = repository.get(preparationId, Preparation.class);
    final long oldModificationDate = preparation.getLastModificationDate();
    assertThat(preparation.getHeadId(), is(Step.ROOT_STEP.getId()));
    // when
    applyTransformation(preparationId, "actions/append_multi_upper_case.json");
    // then
    preparation = repository.get(preparation.id(), Preparation.class);
    assertThat(preparation.getLastModificationDate(), is(greaterThan(oldModificationDate)));
    final Step head = repository.get(preparation.getHeadId(), Step.class);
    final Step lastBeforeHead = repository.get(head.getParent(), Step.class);
    final PreparationActions headAction = repository.get(head.getContent(), PreparationActions.class);
    final PreparationActions lastBeforeHeadAction =
            repository.get(lastBeforeHead.getContent(), PreparationActions.class);
    // first step : contains only uppercase on lastname
    assertThat(lastBeforeHeadAction.getActions(), hasSize(1));
    assertThat(lastBeforeHeadAction.getActions().get(0).getName(), is("uppercase"));
    assertThat(lastBeforeHeadAction.getActions().get(0).getParameters().get("column_name"), is("lastname"));
    // second step : contains first step actions + uppercase on firstname
    assertThat(headAction.getActions(), hasSize(2));
    assertThat(headAction.getActions().get(0).getName(), is("uppercase"));
    assertThat(headAction.getActions().get(0).getParameters().get("column_name"), is("lastname"));
    assertThat(headAction.getActions().get(1).getName(), is("uppercase"));
    assertThat(headAction.getActions().get(1).getParameters().get("column_name"), is("firstname"));
}