@Test
public void updateDatasetColumn_should_clear_domain() 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();
    DataSetMetadata dataSetMetadata = dataSetMetadataRepository.get(dataSetId);
    assertNotNull(dataSetMetadata);
    RowMetadata row = dataSetMetadata.getRowMetadata();
    assertNotNull(row);
    final ColumnMetadata column = row.getById("0002");
    assertThat(column.getDomain(), is("FIRST_NAME"));
    assertThat(column.getDomainLabel(), is("First Name"));
    assertThat(column.getDomainFrequency(), is(100.0F));
    // when
    final Response res = given() //
            .body("{\"domain\": \"\"}") //
            .when() //
            .contentType(JSON) //
            .post("/datasets/{dataSetId}/column/{columnId}", dataSetId, "0002");
    // then
    res.then().statusCode(200);
    dataSetMetadata = dataSetMetadataRepository.get(dataSetId);
    assertNotNull(dataSetMetadata);
    row = dataSetMetadata.getRowMetadata();
    assertNotNull(row);
    final ColumnMetadata actual = row.getById("0002");
    assertThat(actual.getDomain(), is(""));
    assertThat(actual.getDomainLabel(), is(""));
    assertThat(actual.getDomainFrequency(), is(0.0F));
}