public static <T extends Collection<Severity>> Severity getMaxSeverity(final T severities,
                                                                           final Severity defaultValue) {
        if (severities == null || severities.isEmpty()) {
            return defaultValue;
        } else {
            // GWT so can't use requireNonNullElse
            return severities.stream()
                    .map(severity -> severity != null
                            ? severity
                            : defaultValue)
                    .max(LOW_TO_HIGH_COMPARATOR)
                    .orElse(defaultValue);
        }
    }
Get the highest (most severe) severity in the list of severities. If there are no severities,
return {@code defaultValue}.
stroom-util-shared/src/main/java/stroom/util/shared/Severity.java