docs: public static void assertAssignmentQuota(final Long parentId, final long requested, final long limit,
              @NotNull final String type, @NotNull final String parentType, final Function<Long, Long> countFct) {
  
          // check if the quota is unlimited
          if (limit <= 0) {
              LOG.debug("Quota 'Max {} entities per {}' is unlimited.", type, parentType);
              return;
          }
  
          if (requested > limit) {
              final String parentIdStr = parentId != null ? String.valueOf(parentId) : "<new>";
              LOG.warn("Cannot assign {} {} entities to {} '{}' because of the configured quota limit {}.", requested,
                      type, parentType, parentIdStr, limit);
              throw new QuotaExceededException(type, parentType, parentId, requested, limit);
          }
  
          if (parentId != null && countFct != null) {
              final long currentCount = countFct.apply(parentId);
              if (currentCount + requested > limit) {
                  LOG.warn(
                          "Cannot assign {} {} entities to {} '{}' because of the configured quota limit {}. Currently, there are {} {} entities assigned.",
                          requested, type, parentType, parentId, limit, currentCount, type);
                  throw new QuotaExceededException(type, parentType, parentId, requested, limit);
              }
          }
      }