@Test
public void shouldReturnListOfSpecificDatasetPreparations() throws Exception {

    // given : relevant preparation
    final String wantedDataSetId = "wanted";
    final String preparation1 = createPreparation(wantedDataSetId, "prep_1");
    final String preparation2 = createPreparation(wantedDataSetId, "prep_2");
    // given : noise data not to be returned by the service
    final String preparation3 = createPreparation("4523", "prep_3");
    final String preparation4 = createPreparation("7534", "prep_4");
    final String preparation5 = createPreparation("1598", "prep_5");
    // when
    final String result = when().get("/preparations/search?dataSetId=" + wantedDataSetId).asString();
    final List<String> preparationIds = JsonPath.from(result).get("id");
    // then
    assertThat(preparationIds, hasItem(preparation1));
    assertThat(preparationIds, hasItem(preparation2));
    assertThat(preparationIds, not(hasItem(preparation3)));
    assertThat(preparationIds, not(hasItem(preparation4)));
    assertThat(preparationIds, not(hasItem(preparation5)));
}