@Test
public void create() throws Exception {

    // given
    assertThat(repository.list(Preparation.class).count(), is(0L));
    final String preparationId = createPreparationWithAPI(
            "{\"name\": \"test_name\", \"dataSetId\": \"1234\", \"rowMetadata\":{\"columns\":[]}}}}");
    assertThat(repository.list(Preparation.class).count(), is(1L));
    // when
    final Optional<Preparation> first = repository.list(Preparation.class).findFirst();
    assertThat(first.isPresent(), is(true));
    final Preparation preparation = first.get();
    // then
    assertThat(preparation.id(), is(preparationId));
    assertThat(preparation.getName(), is("test_name"));
    assertThat(preparation.getAuthor(), is(System.getProperty("user.name")));
    assertThat(preparation.getAppVersion(), is(versionService.version().getVersionId()));
}