@Test
public void shouldChangePreparationHead() throws Exception {

    // given
    final String preparationId = createPreparation("1234", "my preparation");
    final String firstStepId = applyTransformation(preparationId, "actions/append_upper_case.json");
    final String secondStepId = applyTransformation(preparationId, "actions/append_lower_case.json");
    Preparation preparation = repository.get(preparationId, Preparation.class);
    assertThat(preparation.getHeadId(), is(secondStepId));
    // when
    given()
            .when()//
            .put("/preparations/{id}/head/{stepId}", preparationId, firstStepId)//
            .then()//
            .statusCode(200);
    // then
    preparation = repository.get(preparationId, Preparation.class);
    assertThat(preparation.getHeadId(), is(firstStepId));
}