@Test
public void testAnalysisWithLimit() {

    final DataSetMetadata metadata = createMetadata(UUID.randomUUID().toString(),
            Arrays.asList("id", "first_name", "last_name", "email", "gender", "ip_address"));
    metadataBuilder.metadata().id("3548").build();
    createCsvDataSet(metadata, "100_lines.csv");
    final Long newLimit = 16L;
    final Long originalLimit =
            (Long) ReflectionTestUtils.getField(contentAnalysis, ContentAnalysis.class, "sizeLimit");
    ReflectionTestUtils.setField(contentAnalysis, "sizeLimit", newLimit);
    contentAnalysis.analyze(metadata.getId());
    ReflectionTestUtils.setField(contentAnalysis, "sizeLimit", originalLimit);
    final DataSetMetadata actual = dataSetMetadataRepository.get(metadata.getId());
    final Optional<Long> limit = actual.getContent().getLimit();
    assertTrue(limit.isPresent());
    assertThat(limit.get(), is(newLimit));
}