class SeverityService {

    public String getDefaultSeverityCode(List<SeverityDTO> severities) {
        return severities.stream()
                .filter(SeverityDTO::isDefaultOnMissing)
                .findFirst()
                .map(SeverityDTO::getCode)
                // Launched with explicit severity tags, and the default one was excluded: scenarios with no severity would not run neither
                // WARNING: when running only non-blocking runs, no severity is mandatory, so we find no default in them
                .orElse(null);
    }

}