public int deleteByEventDefinitionId(String id) {
        return findByEventDefinitionId(id)
                .map(dto -> db.removeById(new ObjectId(requireNonNull(dto.id()))).getN())
                .orElse(0);
    }
@Test
    @MongoDBFixtures("event-processor-state.json")
    public void deleteByEventProcessorId() {
        assertThat(stateService.deleteByEventDefinitionId("54e3deadbeefdeadbeefaff3")).isEqualTo(1);
        assertThat(stateService.deleteByEventDefinitionId("nope")).isEqualTo(0);
    }