@Test
public void shouldListOnlyPreparationsExactlyMatchingGivenName() {

    final List<Integer> ids = Arrays.asList(1, 12, 3);
    // store preparations
    final List<Preparation> preparations = ids
            .stream() //
            .map(i -> getPreparation(String.valueOf(i))) //
            .collect(Collectors.toList());
    preparations.forEach(prep -> repository.add(prep));
    // and some steps to add some noise
    ids
            .stream()
            .map(i -> new Step(Step.ROOT_STEP.id(), "step" + i, versionService.version().getVersionId())) //
            .forEach(step -> repository.add(step));
    // get some preparation by dataset id
    final Preparation expected = preparations.get(0);
    final Collection<Preparation> actual =
            repository.list(Preparation.class, eq("name", "prep-1")).collect(Collectors.toList());
    assertEquals(1, actual.size());
    assertTrue(actual.contains(expected));
}