@Test
public void shouldUpdateStepMetadata() {

    // when
    task.run();
    // then
    List<PersistentPreparation> preparationList = preparationRepository
            .list(PersistentPreparation.class)
            .sorted(Comparator.comparingInt(o -> o.getSteps().size()))
            .collect(Collectors.toList());
    assertEquals(4, preparationList.get(0).getSteps().size());
    assertEquals(8, preparationList.get(1).getSteps().size());
}