@Test
public void shouldListPreparationSummary() throws Exception {

    // given
    for (int i = 0; i < 6; i++) {
        final String dataSetId = testClient.createDataset("dataset/dataset.csv", "testDataset-" + i);
        for (int j = 0; j < 6; j++) {
            testClient.createPreparationFromDataset(dataSetId, "preparation-" + i + "-" + j, home.getId());
        }
    }
    // when
    final Response response = when().get("/api/datasets/summary");
    // then
    assertEquals(200, response.getStatusCode());
    // because an empty constructor cannot be added to the the EnrichedDataSetMetadata, tree parsing is mandatory
    final JsonNode rootNode = mapper.readTree(response.asInputStream());
    assertTrue(rootNode.isArray());
    assertEquals(6, rootNode.size());
    for (JsonNode dataset : rootNode) {
        checkNotNull(dataset, "id");
        checkNotNull(dataset, "name");
    }
}