@Test
public void shouldUpgradeJobWhenNeeded() {

  Source source = DataGenerator.createSource("kafka:9092", "topic");
  Store store = DataGenerator.getDefaultStore();
  Job job = Job.builder().setSource(source).setId("some-id").build();
  job.setStatus(JobStatus.RUNNING);
  job.setExtId("extId");
  jobRepository.add(job);
  List<JobTask> tasks =
      controllerWithConsolidation.makeJobUpdateTasks(
          ImmutableList.of(Pair.of(source, ImmutableSet.of(store))));
  assertThat("CreateTask is expected", tasks.get(0) instanceof CreateJobTask);
}