@Override
  public void store(Measure newMeasure) {
    saveMeasure(newMeasure.inputComponent(), (DefaultMeasure<?>) newMeasure);
  }
@Test
  public void should_merge_coverage() {
    DefaultInputFile file = new TestInputFileBuilder("foo", "src/Foo.php").setLines(5).build();

    DefaultCoverage coverage = new DefaultCoverage(underTest);
    coverage.onFile(file).lineHits(3, 1);

    DefaultCoverage coverage2 = new DefaultCoverage(underTest);
    coverage2.onFile(file).lineHits(1, 1);

    underTest.store(coverage);
    underTest.store(coverage2);

    List<ScannerReport.LineCoverage> lineCoverage = new ArrayList<>();
    reportReader.readComponentCoverage(file.scannerId()).forEachRemaining(lineCoverage::add);
    assertThat(lineCoverage).containsExactly(
      // should be sorted by line
      ScannerReport.LineCoverage.newBuilder().setLine(1).setHits(true).build(),
      ScannerReport.LineCoverage.newBuilder().setLine(3).setHits(true).build());

  }