code: private List<ResourceModel> generateResources(List<ResourceBuilderModel> resourceBuilders, EventModel event) {
          Optional<EventModel> parameter = event != null ? Optional.of(event) : Optional.empty();
          List<CompletableFuture<List<ResourceModel>>> futures = resourceBuilders.stream()
                  .map(resourceB -> submit(() -> resourceB.provideResource(resourceB.announceResources(), parameter)))
                  .collect(Collectors.toList());
  
          try {
              futures = timeOut(futures, 3000);
          } catch (InterruptedException e) {
              debug("interrupted while doing an time-out", e);
          }
  
          return futures.stream()
                  .map(future -> {
                      try {
                          return future.get();
                      } catch (InterruptedException | ExecutionException e) {
                          debug("exception while trying to get the result from the future", e);
                          return null;
                      }
                  })
                  .filter(Objects::nonNull)
                  .flatMap(Collection::stream)
                  .collect(Collectors.toList());
      }
docs: generates the resources with a 1 sec. timeout for each ResourceBuilder
  @param resourceBuilders the ResourceBuilders
  @param event the event or null if not present
  @return a List of generated resources