@Test public void doNotActivateIfAlreadyStartedTest() { when(jobExecutor.isActive()).thenReturn(true); jobExecutorStartingEventListener.activate(); verify(jobExecutor, times(0)).start(); }
protected void activate() { if (!jobExecutor.isActive()) { jobExecutor.start(); } else { LOGGER.info("job executor is already active"); } }
JobExecutorStartingEventListener { protected void activate() { if (!jobExecutor.isActive()) { jobExecutor.start(); } else { LOGGER.info("job executor is already active"); } } }
JobExecutorStartingEventListener { protected void activate() { if (!jobExecutor.isActive()) { jobExecutor.start(); } else { LOGGER.info("job executor is already active"); } }  }
JobExecutorStartingEventListener { protected void activate() { if (!jobExecutor.isActive()) { jobExecutor.start(); } else { LOGGER.info("job executor is already active"); } }  @EventListener void handleProcessApplicationStartedEvent(ProcessApplicationStartedEvent processApplicationStartedEvent); }
JobExecutorStartingEventListener { protected void activate() { if (!jobExecutor.isActive()) { jobExecutor.start(); } else { LOGGER.info("job executor is already active"); } }  @EventListener void handleProcessApplicationStartedEvent(ProcessApplicationStartedEvent processApplicationStartedEvent);  }