private TestOutcome scenarioOutcomeFor(
     String normalizedMethodName,
     TestOutcome testOutcome,
     Map<String, TestOutcome> scenarioOutcomes) {
   if (!scenarioOutcomes.containsKey(normalizedMethodName)) {
     TestOutcome scenarioOutcome = createScenarioOutcome(testOutcome);
     scenarioOutcomes.put(normalizedMethodName, scenarioOutcome);
   }
   return scenarioOutcomes.get(normalizedMethodName);
 }
  private List<TestOutcome> aggregatedScenarioOutcomes(List<TestOutcome> allOutcomes) {
    Map<String, TestOutcome> scenarioOutcomes = new HashMap<>();

    for (TestOutcome testOutcome : allOutcomes) {
      final String normalizedMethodName = baseMethodName(testOutcome);

      TestOutcome scenarioOutcome =
          scenarioOutcomeFor(normalizedMethodName, testOutcome, scenarioOutcomes);
      recordTestOutcomeAsSteps(testOutcome, scenarioOutcome);

      if (testOutcome.isDataDriven()) {
        updateResultsForAnyExternalFailures(
            testOutcome, scenarioOutcomes.get(normalizedMethodName));
        scenarioOutcome.addDataFrom(testOutcome.getDataTable());
      }
    }

    List<TestOutcome> aggregatedScenarioOutcomes = new ArrayList<>();
    aggregatedScenarioOutcomes.addAll(scenarioOutcomes.values());
    return aggregatedScenarioOutcomes;
  }