public Map<String, List<JobDefinitionDto>> getAllByConfigField(String configField, Collection<? extends Object> values) {
        final String field = String.format(Locale.US, "%s.%s", JobDefinitionDto.FIELD_CONFIG, configField);

        return StreamEx.of(db.find(DBQuery.in(field, values))).groupingBy(configFieldGroup(configField));
    }
@Test
    @MongoDBFixtures("job-definitions-with-triggers.json")
    public void getAllByConfigField() {
        final String eventDefinitionId = "54e3deadbeefdeadbeef0000";
        final Map<String, List<JobDefinitionDto>> result = service.getAllByConfigField("event_definition_id", Collections.singleton(eventDefinitionId));

        assertThat(result).isNotEmpty();
        assertThat(result.get(eventDefinitionId)).hasSize(2);
        assertThat(result.get(eventDefinitionId).get(0)).satisfies(jobDefinition -> {
            assertThat(jobDefinition.id()).isEqualTo("54e3deadbeefdeadbeef0000");
            assertThat(jobDefinition.title()).isEqualTo("Test 1");
        });
        assertThat(result.get(eventDefinitionId).get(1)).satisfies(jobDefinition -> {
            assertThat(jobDefinition.id()).isEqualTo("54e3deadbeefdeadbeef0001");
            assertThat(jobDefinition.title()).isEqualTo("Test 2");
        });
    }