@Test
public void delete() throws Exception {

    // given
    assertThat(repository.list(Preparation.class).count(), is(0L));
    final String preparationId = createPreparationWithAPI(
            "{\"name\": \"test_name\", \"dataSetId\": \"1234\", \"rowMetadata\":{\"columns\":[]}}}}");
    final Collection<Preparation> preparations = repository.list(Preparation.class).collect(Collectors.toList());
    assertThat(repository.list(Preparation.class).count(), is(1L));
    final Preparation preparation = preparations.iterator().next();
    assertThat(preparation.id(), is(preparationId));
    assertThat(preparation.getName(), is("test_name"));
    assertThat(doesPreparationExists(preparationId), is(true));
    // when
    clientTest.deletePreparation(preparationId);
    // then
    assertThat(repository.list(Preparation.class).count(), is(0L));
    assertThat(doesPreparationExists(preparationId), is(false));
}