public int forceReleaseOwnedTriggers() {
        final var filter = and(
                // Only select trigger for force release which are owned by the calling node
                eq(FIELD_LOCK_OWNER, nodeId),
                eq(FIELD_STATUS, JobTriggerStatus.RUNNING)
        );
        final var update = combine(
                unset(FIELD_LOCK_OWNER),
                set(FIELD_STATUS, JobTriggerStatus.RUNNABLE));

        return Ints.saturatedCast(collection.updateMany(filter, update).getModifiedCount());
    }
@Test
    @MongoDBFixtures("stale-job-triggers.json")
    public void forceReleaseOwnedTriggers() {
        final Set<String> triggerIds = dbJobTriggerService.all().stream()
                .filter(dto -> JobTriggerStatus.RUNNING.equals(dto.status()))
                .map(JobTriggerDto::id)
                .collect(Collectors.toSet());

        assertThat(triggerIds).containsOnly("54e3deadbeefdeadbeef0001", "54e3deadbeefdeadbeef0002", "54e3deadbeefdeadbeef0004");

        assertThat(dbJobTriggerService.forceReleaseOwnedTriggers()).isEqualTo(2);

        final Set<String> newTriggerIds = dbJobTriggerService.all().stream()
                .filter(dto -> JobTriggerStatus.RUNNING.equals(dto.status()))
                .map(JobTriggerDto::id)
                .collect(Collectors.toSet());

        // Running triggers not owned by this node should not be released
        assertThat(newTriggerIds).containsOnly("54e3deadbeefdeadbeef0002");
    }