@Test
public void testCache() throws Exception {

    // given
    String dsId = createDataset("input_dataset.csv", "uppercase", "text/csv");
    String prepId = createEmptyPreparationFromDataset(dsId, "uppercase prep");
    applyActionFromFile(prepId, "uppercase_action.json");
    final PreparationDTO preparation = getPreparation(prepId);
    final String headId = preparation.getHeadId();
    final TransformationCacheKey key = cacheKeyGenerator.generateContentKey( //
            dsId, //
            preparation.getId(), //
            headId, //
            JSON, //
            HEAD, //
            "" // no filter
    );
    assertFalse(contentCache.has(key));
    // when
    given() //
            .expect()
            .statusCode(200)
            .log()
            .ifError()//
            .when() //
            .get("/apply/preparation/{prepId}/dataset/{datasetId}/{format}", prepId, dsId, "JSON") //
            .asString();
    // then
    assertTrue(contentCache.has(key));
    // just to pass through the cache
    final Response response = given() //
            .expect()
            .statusCode(200)
            .log()
            .ifError()//
            .when() //
            .get("/apply/preparation/{prepId}/dataset/{datasetId}/{format}", prepId, dsId, "JSON");
    Assert.assertThat(response.getStatusCode(), is(200));
}