@Test
public void shouldAggregateReports() throws URISyntaxException {

  SensorContextTester context = SensorContextTester.create(new File(""));
  parser.collect(context, getDir("multipleReports"));
  // Only 6 tests measures should be stored, no more: the TESTS-AllTests.xml must not be read as there's 1 file result per unit test
  // (SONAR-2841).
  assertThat(context.measures(":ch.hortis.sonar.mvn.mc.MetricsCollectorRegistryTest")).hasSize(6);
  assertThat(context.measures(":ch.hortis.sonar.mvn.mc.CloverCollectorTest")).hasSize(6);
  assertThat(context.measures(":ch.hortis.sonar.mvn.mc.CheckstyleCollectorTest")).hasSize(6);
  assertThat(context.measures(":ch.hortis.sonar.mvn.SonarMojoTest")).hasSize(6);
  assertThat(context.measures(":ch.hortis.sonar.mvn.mc.JDependsCollectorTest")).hasSize(6);
  assertThat(context.measures(":ch.hortis.sonar.mvn.mc.JavaNCSSCollectorTest")).hasSize(6);
}