public void schedule(String eventDefinitionId) {
        final EventDefinitionDto eventDefinition = getEventDefinitionOrThrowIAE(eventDefinitionId);

        createJobDefinitionAndTriggerIfScheduledType(eventDefinition);
    }
@Test
    @MongoDBFixtures("event-processors-without-schedule.json")
    public void scheduleWithMissingEventDefinition() {
        final String id = "54e3deadbeefdeadbeef9999";

        // The event definition should not exist so our test works
        assertThat(eventDefinitionService.get(id)).isNotPresent();

        assertThatThrownBy(() -> handler.schedule(id))
                .hasMessageContaining("doesn't exist")
                .isInstanceOf(IllegalArgumentException.class);
    }