public boolean containsCategory(ErrorCategory category) {
    Condition<Integer> belongsToCategoryCondition = errorCode -> categoryCodeOf(errorCode) == category.getCode();

    return ContainerUtil.exists(errors.keySet(), belongsToCategoryCondition) ||
           ContainerUtil.exists(warnings.keySet(), belongsToCategoryCondition);
  }
public boolean containsCategory(ErrorCategory category)