public PaginatedList<StreamDestinationFilterRuleDTO> findPaginatedForStreamAndTarget(
            String streamId,
            String targetId,
            String queryString,
            Bson sort,
            int perPage,
            int page,
            Predicate<String> permissionSelector
    ) {
        final var query = parseQuery(queryString);

        return paginationHelper.filter(and(eq(FIELD_STREAM_ID, streamId), eq(FIELD_DESTINATION_TYPE, targetId), query))
                .sort(sort)
                .perPage(perPage)
                .page(page, dto -> permissionSelector.test(dto.id()));
    }
@Test
    @MongoDBFixtures("StreamDestinationFilterServiceTest-2024-07-01-1.json")
    void findPaginatedForStreamAndTarget() {
        final var result = service.findPaginatedForStreamAndTarget("54e3deadbeefdeadbeef1000", "indexer", "", Sorts.ascending("title"), 10, 1, id -> true);

        assertThat(result.delegate()).hasSize(2);
    }