public StreamDestinationFilterRuleDTO updateForStream(String streamId, StreamDestinationFilterRuleDTO dto) {
        // We don't want to allow the creation of a filter rule for a different stream, so we enforce the stream ID.
        collection.replaceOne(
                and(eq(FIELD_STREAM_ID, streamId), idEq(requireNonBlank(dto.id(), "id can't be blank"))),
                dto.withStream(streamId)
        );
        clusterEventBus.post(StreamDestinationFilterUpdatedEvent.of(requireNonBlank(dto.id())));

        return utils.getById(dto.id())
                .orElseThrow(() -> new IllegalArgumentException(f("Couldn't find updated document: %s", dto)));
    }
@Test
    @MongoDBFixtures("StreamDestinationFilterServiceTest-2024-07-01-1.json")
    void updateForStream() {
        final var optionalDto = service.findByIdForStream("54e3deadbeefdeadbeef1000", "54e3deadbeefdeadbeef0000");

        assertThat(optionalDto).isPresent().get().satisfies(d -> {
            assertThat(d.title()).isEqualTo("Test Filter 1");
        });

        final var dto = optionalDto.get();

        final var updatedDto = service.updateForStream(dto.streamId(), dto.toBuilder().title("Changed title").build());
        final var reloadedUpdatedDto = service.findByIdForStream("54e3deadbeefdeadbeef1000", "54e3deadbeefdeadbeef0000");

        assertThat(updatedDto).satisfies(d -> {
            assertThat(d.title()).isEqualTo("Changed title");
        });
        assertThat(reloadedUpdatedDto).get().satisfies(d -> {
            assertThat(d.title()).isEqualTo("Changed title");
        });
    }