public void stop(boolean clear) {
        if (running) {
            jobEventStore.stop(clear);
            running = false;
        }
    }
@Test
    void testStop() throws Exception {
        TestingJobEventStore.init();
        JobEventManager jobEventManager = new JobEventManager(new TestingJobEventStore());

        jobEventManager.start();
        assertThat(jobEventManager.isRunning()).isTrue();
        jobEventManager.stop(true);
        assertThat(jobEventManager.isRunning()).isFalse();
    }