public ImmutableSetMultimap<String, Pipeline> resolveStreamConnections(Map<String, Pipeline> currentPipelines) {
        // Read all stream connections of those pipelines to allow processing messages through them
        final HashMultimap<String, Pipeline> connections = HashMultimap.create();

        try (final var pipelineConnectionsStream = pipelineConnectionsSupplier.get()) {
            pipelineConnectionsStream.forEach(streamConnection -> {
                streamConnection.pipelineIds().stream()
                        .map(currentPipelines::get)
                        .filter(Objects::nonNull)
                        .forEach(pipeline -> connections.put(streamConnection.streamId(), pipeline));
            });
        }

        return ImmutableSetMultimap.copyOf(connections);
    }
@Test
    void resolveStreamConnections() {
        final var registry = PipelineMetricRegistry.create(metricRegistry, Pipeline.class.getName(), Rule.class.getName());
        final var resolver = new PipelineResolver(
                new PipelineRuleParser(new FunctionRegistry(Map.of())),
                PipelineResolverConfig.of(
                        () -> Stream.of(rule1),
                        () -> Stream.of(pipeline1),
                        () -> Stream.of(connections1, connections2)
                )
        );

        final var pipelines = resolver.resolvePipelines(registry);
        final var streamConnections = resolver.resolveStreamConnections(pipelines);

        assertThat(streamConnections.size()).isEqualTo(2);
        assertThat(streamConnections.get("stream-1").stream().toList()).satisfies(connections -> {
            assertThat(connections).hasSize(1);
            assertThat(connections.get(0).id()).isEqualTo("pipeline-1");
        });
        assertThat(streamConnections.get("stream-2").stream().toList()).satisfies(connections -> {
            assertThat(connections).hasSize(1);
            assertThat(connections.get(0).id()).isEqualTo("pipeline-1");
        });
    }