@Test
public void shouldAbortJobThenRemoveFromRegistry() throws IOException {

  Job job =
      Job.builder()
          .setSource(source)
          .setStores(ImmutableMap.of(store.getName(), store))
          .setId("id")
          .build();
  job.setExtId("ext1");
  job.setStatus(JobStatus.RUNNING);
  DirectJob directJob = Mockito.mock(DirectJob.class);
  when(directJobRegistry.get("ext1")).thenReturn(directJob);
  job = drJobManager.abortJob(job);
  verify(directJob, times(1)).abort();
  verify(directJobRegistry, times(1)).remove("ext1");
}