コード例 #1
0
  @Test
  @Ignore
  public void dontRunTranscodingWhenJobIsNotExists() {
    when(jobRepository.findEldestJobOfcreatedState()).thenReturn(null);
    runner.run();

    verify(transcodingService, never()).transcode(anyLong());
  }
コード例 #2
0
  @Test
  public void runTranscodingWhenJobQueueIsNotExists() {
    when(job.getId()).thenReturn(1L);
    when(jobQueue.nextJobId()).thenReturn(1L).thenThrow(new JobQueue.ClosedException());

    runner.run();
    verify(transcodingService, only()).transcode(1L);
  }