@Test void testCancel() { JobExecution jobExecution = mock(JobExecution.class); Progress progress = mock(Progress.class); when(jobExecutionRegistry.getJobExecutionProgress(jobExecution)).thenReturn(progress); jobExecutor.cancel(jobExecution); verify(progress).canceling(); }
public void cancel(JobExecution jobExecution) { Progress progress = jobExecutionRegistry.getJobExecutionProgress(jobExecution); progress.canceling(); }
JobExecutor { public void cancel(JobExecution jobExecution) { Progress progress = jobExecutionRegistry.getJobExecutionProgress(jobExecution); progress.canceling(); } }
JobExecutor { public void cancel(JobExecution jobExecution) { Progress progress = jobExecutionRegistry.getJobExecutionProgress(jobExecution); progress.canceling(); } JobExecutor(
      DataService dataService,
      EntityManager entityManager,
      ExecutorService executorService,
      JobFactoryRegistry jobFactoryRegistry,
      JobExecutionContextFactory jobExecutionContextFactory,
      JobExecutionRegistry jobExecutionRegistry); }
JobExecutor { public void cancel(JobExecution jobExecution) { Progress progress = jobExecutionRegistry.getJobExecutionProgress(jobExecution); progress.canceling(); } JobExecutor(
      DataService dataService,
      EntityManager entityManager,
      ExecutorService executorService,
      JobFactoryRegistry jobFactoryRegistry,
      JobExecutionContextFactory jobExecutionContextFactory,
      JobExecutionRegistry jobExecutionRegistry); @RunAsSystem void executeScheduledJob(String scheduledJobId); CompletableFuture<Void> submit(JobExecution jobExecution); CompletableFuture<Void> submit(
      JobExecution jobExecution, ExecutorService executorService); void cancel(JobExecution jobExecution); }
JobExecutor { public void cancel(JobExecution jobExecution) { Progress progress = jobExecutionRegistry.getJobExecutionProgress(jobExecution); progress.canceling(); } JobExecutor(
      DataService dataService,
      EntityManager entityManager,
      ExecutorService executorService,
      JobFactoryRegistry jobFactoryRegistry,
      JobExecutionContextFactory jobExecutionContextFactory,
      JobExecutionRegistry jobExecutionRegistry); @RunAsSystem void executeScheduledJob(String scheduledJobId); CompletableFuture<Void> submit(JobExecution jobExecution); CompletableFuture<Void> submit(
      JobExecution jobExecution, ExecutorService executorService); void cancel(JobExecution jobExecution);  }