@Test
public void datePattern() throws Exception {

    int before = dataSetMetadataRepository.size();
    String dataSetId = given()
            .body(IOUtils.toString(this.getClass().getResourceAsStream("../date_time_pattern.csv"), UTF_8))
            .queryParam(CONTENT_TYPE, "text/csv")
            .when()
            .post("/datasets")
            .asString();
    int after = dataSetMetadataRepository.size();
    assertThat(after - before, is(1));
    assertQueueMessages(dataSetId);
    final DataSetMetadata dataSetMetadata = dataSetMetadataRepository.get(dataSetId);
    assertNotNull(dataSetMetadata);
    final ColumnMetadata column = dataSetMetadata.getRowMetadata().getById("0001");
    assertThat(column.getType(), is("date"));
    assertThat(column.getDomain(), is(""));
    final Statistics statistics = mapper.readerFor(Statistics.class).readValue(
            this.getClass().getResourceAsStream("../date_time_pattern_expected.json"));
    assertThat(column.getStatistics(), equalTo(statistics));
}