public StreamDestinationFilterRuleDTO createForStream(String streamId, StreamDestinationFilterRuleDTO dto) {
        if (!isBlank(dto.id())) {
            throw new IllegalArgumentException("id must be blank");
        }

        // We don't want to allow the creation of a filter rule for a different stream, so we enforce the stream ID.
        final var dtoId = insertedId(collection.insertOne(dto.withStream(streamId)));
        clusterEventBus.post(StreamDestinationFilterUpdatedEvent.of(dtoId.toHexString()));
        return utils.getById(dtoId)
                .orElseThrow(() -> new IllegalArgumentException(f("Couldn't insert document: %s", dto)));
    }
@Test
    void createForStreamWithExistingID() {
        final StreamDestinationFilterRuleDTO dto = StreamDestinationFilterRuleDTO.builder()
                .id("54e3deadbeefdeadbeef0000")
                .title("Test")
                .description("A Test")
                .streamId("stream-1")
                .destinationType("indexer")
                .status(StreamDestinationFilterRuleDTO.Status.DISABLED)
                .rule(RuleBuilder.builder()
                        .operator(RuleBuilderStep.Operator.AND)
                        .conditions(List.of(
                                RuleBuilderStep.builder()
                                        .function("has_field")
                                        .parameters(Map.of("field", "is_debug"))
                                        .build()
                        ))
                        .build())
                .build();

        assertThatThrownBy(() -> service.createForStream("stream-1", dto)).isInstanceOf(IllegalArgumentException.class);
    }