@Override
  public void execute(ComputationStep.Context context) {
    new PathAwareCrawler<>(
      FormulaExecutorComponentVisitor.newBuilder(metricRepository, measureRepository)
        .buildFor(
          Iterables.concat(NewLinesAndConditionsCoverageFormula.from(newLinesRepository, reportReader), FORMULAS)))
            .visit(treeRootHolder.getRoot());
  }
@Test
  public void verify_aggregation_of_measures_for_new_conditions() {
    when(newLinesRepository.newLinesAvailable()).thenReturn(true);

    treeRootHolder.setRoot(MULTIPLE_FILES_TREE);
    defineNewLinesAndLineCoverage(FILE_1, new LineCoverageValues(3, 4, 1), new LineCoverageValues(0, 3, 2));
    defineNewLinesAndLineCoverage(FILE_2, new LineCoverageValues(0, 14, 6), new LineCoverageValues(0, 13, 7));
    defineNewLinesAndLineCoverage(FILE_3, new LineCoverageValues(3, 4, 1), new LineCoverageValues(1, 13, 7));

    underTest.execute(new TestComputationStepContext());

    // files
    assertThat(toEntries(measureRepository.getAddedRawMeasures(FILE_1_REF))).contains(
      entryOf(NEW_LINES_TO_COVER_KEY, createMeasure(5)),
      entryOf(NEW_UNCOVERED_LINES_KEY, createMeasure(3)),
      entryOf(NEW_CONDITIONS_TO_COVER_KEY, createMeasure(7)),
      entryOf(NEW_UNCOVERED_CONDITIONS_KEY, createMeasure(4)));
    assertThat(toEntries(measureRepository.getAddedRawMeasures(FILE_2_REF))).contains(
      entryOf(NEW_LINES_TO_COVER_KEY, createMeasure(5)),
      entryOf(NEW_UNCOVERED_LINES_KEY, createMeasure(4)),
      entryOf(NEW_CONDITIONS_TO_COVER_KEY, createMeasure(27)),
      entryOf(NEW_UNCOVERED_CONDITIONS_KEY, createMeasure(14)));
    assertThat(toEntries(measureRepository.getAddedRawMeasures(FILE_3_REF))).contains(
      entryOf(NEW_LINES_TO_COVER_KEY, createMeasure(5)),
      entryOf(NEW_UNCOVERED_LINES_KEY, createMeasure(2)),
      entryOf(NEW_CONDITIONS_TO_COVER_KEY, createMeasure(17)),
      entryOf(NEW_UNCOVERED_CONDITIONS_KEY, createMeasure(9)));
    // directories
    assertThat(toEntries(measureRepository.getAddedRawMeasures(DIRECTORY_1_REF))).contains(
      entryOf(NEW_LINES_TO_COVER_KEY, createMeasure(5)),
      entryOf(NEW_UNCOVERED_LINES_KEY, createMeasure(3)),
      entryOf(NEW_CONDITIONS_TO_COVER_KEY, createMeasure(7)),
      entryOf(NEW_UNCOVERED_CONDITIONS_KEY, createMeasure(4)));
    assertThat(toEntries(measureRepository.getAddedRawMeasures(DIRECTORY_2_REF))).contains(
      entryOf(NEW_LINES_TO_COVER_KEY, createMeasure(10)),
      entryOf(NEW_UNCOVERED_LINES_KEY, createMeasure(6)),
      entryOf(NEW_CONDITIONS_TO_COVER_KEY, createMeasure(44)),
      entryOf(NEW_UNCOVERED_CONDITIONS_KEY, createMeasure(23)));
    // submodule
    MeasureRepoEntry[] repoEntriesFromProject = {entryOf(NEW_LINES_TO_COVER_KEY, createMeasure(15)),
      entryOf(NEW_UNCOVERED_LINES_KEY, createMeasure(9)),
      entryOf(NEW_CONDITIONS_TO_COVER_KEY, createMeasure(51)),
      entryOf(NEW_UNCOVERED_CONDITIONS_KEY, createMeasure(27))};
    // project
    assertThat(toEntries(measureRepository.getAddedRawMeasures(ROOT_REF))).contains(repoEntriesFromProject);
  }