@Test
public void shouldComputePreparationsId() throws Exception {

    // given
    final Stream<Preparation> initialPreparations = preparationRepository.list(Preparation.class);
    final List<String> initialIds = initialPreparations.map(Preparation::getId).collect(Collectors.toList());
    // when
    task.run();
    // then
    final Stream<Preparation> preparations = preparationRepository.list(Preparation.class);
    final List<String> updatedIds = preparations.map(Preparation::getId).collect(Collectors.toList());
    assertEquals(initialIds.size(), updatedIds.size());
    updatedIds.forEach(id -> assertFalse(initialIds.contains(id)));
}