@Test
public void testUpdate() {

    String id = UUID.randomUUID().toString();
    final DataSetMetadata metadata = metadataBuilder.metadata().id(id).build();
    dataSetMetadataRepository.save(metadata);
    contentStore.storeAsRaw(metadata, DataSetServiceTest.class.getResourceAsStream("../avengers.csv"));
    formatAnalysis.analyze(id);
    final DataSetMetadata original = dataSetMetadataRepository.get(id);
    final DataSetMetadata modified = dataSetMetadataRepository.get(id);
    modified.setEncoding("windows-1252");
    modified.getContent().getParameters().put("SEPARATOR", ",");
    formatAnalysis.update(original, modified);
    final DataSetMetadata updated = dataSetMetadataRepository.get(id);
    assertNotNull(updated);
    assertThat(updated.getContent().getFormatFamilyId(), is(CSVFormatFamily.BEAN_ID));
    assertThat(updated.getContent().getMediaType(), is("text/csv"));
    assertThat(updated.getEncoding(), is("windows-1252"));
    //assertThat(updated.getContent().getParameters().get("SEPARATOR"), is(";"));
}