class ExecutionHistoryService {

    void addScenarioForSeverity(ExecutedScenarioWithErrorAndProblemJoin executedScenarioJoin,
                                Map<String, ExecutedScenarioHandlingCountsDTO> qualitiesPerSeverity,
                                String severityCode) {
        ExecutedScenarioHandlingCountsDTO executedScenarioHandlingCounts = qualitiesPerSeverity
                .computeIfAbsent(severityCode, k -> new ExecutedScenarioHandlingCountsDTO());

        incrementCountsByHandling(executedScenarioJoin, executedScenarioHandlingCounts);
    }

}