@Override
    public void getConfig(RuleBasedFilterConfig.Builder builder) {
        Set<String> hostNames = endpoints.stream()
                .flatMap(e -> e.names().stream())
                .collect(Collectors.toCollection(() -> new LinkedHashSet<>()));
        if(hostNames.size() > 0) {
            Collection<String> hostnamesSorted = hostNames.stream().sorted().toList();
            RuleBasedFilterConfig.Rule.Builder rule = new RuleBasedFilterConfig.Rule.Builder()
                    .hostNames(hostnamesSorted)
                    .pathExpressions(ContainerCluster.RESERVED_URI_PREFIX + "/{*}")
                    .pathExpressions(ContainerDocumentApi.DOCUMENT_V1_PREFIX + "/{*}")
                    .methods(List.of(PUT, POST, DELETE))
                    .action(BLOCK)
                    .name("block-feed-global-endpoints")
                    .blockResponseMessage("Feed to global endpoints are not allowed")
                    .blockResponseCode(405)
                    .blockResponseHeaders(new RuleBasedFilterConfig.Rule.BlockResponseHeaders.Builder()
                            .name("Allow")
                            .value("GET, OPTIONS, HEAD"));
            builder.rule(rule);
        }
        builder.dryrun(dryRun);
        builder.defaultRule.action(ALLOW);
    }
@Test
    void does_not_setup_blocking_rule_when_endpoints_empty() {
        var filter = new BlockFeedGlobalEndpointsFilter(Set.of(), true);
        var config = getConfig(filter);
        assertEquals(0, config.rule().size());
    }