@Test
public void should_update_dataset_name() throws Exception {

    // given
    final String dataSetId = given()
            .body(IOUtils.toString(this.getClass().getResourceAsStream(TAGADA_CSV), UTF_8))
            .queryParam("Content-Type", "text/csv")
            .when()
            .post("/datasets")
            .asString();
    assertQueueMessages(dataSetId);
    // when
    final String expectedName = "testOfADataSetName";
    given()
            .body(IOUtils.toString(this.getClass().getResourceAsStream("../tagada3.csv"), UTF_8))
            .queryParam("Content-Type", "text/csv")
            .when()
            .put("/datasets/" + dataSetId + "/raw?name=" + expectedName);
    // then
    final DataSetMetadata dataSetMetadata = dataSetMetadataRepository.get(dataSetId);
    assertThat(dataSetMetadata, notNullValue());
    assertThat(dataSetMetadata.getName(), is(expectedName));
}