@Test void testScheduleDelete() { EntityType entityType = mock(EntityType.class); when(entityType.getId()).thenReturn("entity1"); MetadataDeleteJobExecution jobExecution = mock(MetadataDeleteJobExecution.class); when(metadataDeleteJobExecutionFactory.create()).thenReturn(jobExecution); MetadataDeleteJobExecution actualJobExecution = metadataApiJobService.scheduleDelete(entityType); assertAll( () -> assertEquals(jobExecution, actualJobExecution), () -> verify(jobExecution).setIds(singletonList("entity1")), () -> verify(jobExecutor).submit(jobExecution)); }
@Override public MetadataDeleteJobExecution scheduleDelete(EntityType entityType) { return scheduleDelete(singletonList(entityType.getId())); }
MetadataApiJobServiceImpl implements MetadataApiJobService { @Override public MetadataDeleteJobExecution scheduleDelete(EntityType entityType) { return scheduleDelete(singletonList(entityType.getId())); } }
MetadataApiJobServiceImpl implements MetadataApiJobService { @Override public MetadataDeleteJobExecution scheduleDelete(EntityType entityType) { return scheduleDelete(singletonList(entityType.getId())); } MetadataApiJobServiceImpl(
      MetadataUpsertJobExecutionFactory metadataUpsertJobExecutionFactory,
      MetadataDeleteJobExecutionFactory metadataDeleteJobExecutionFactory,
      JobExecutor jobExecutor,
      EntityTypeSerializer entityTypeSerializer); }
MetadataApiJobServiceImpl implements MetadataApiJobService { @Override public MetadataDeleteJobExecution scheduleDelete(EntityType entityType) { return scheduleDelete(singletonList(entityType.getId())); } MetadataApiJobServiceImpl(
      MetadataUpsertJobExecutionFactory metadataUpsertJobExecutionFactory,
      MetadataDeleteJobExecutionFactory metadataDeleteJobExecutionFactory,
      JobExecutor jobExecutor,
      EntityTypeSerializer entityTypeSerializer); @Override MetadataUpsertJobExecution scheduleCreate(EntityType entityType); @Override MetadataUpsertJobExecution scheduleUpdate(EntityType entityType); @Override MetadataDeleteJobExecution scheduleDelete(EntityType entityType); @Override MetadataDeleteJobExecution scheduleDelete(Collection<EntityType> entityTypes); }
MetadataApiJobServiceImpl implements MetadataApiJobService { @Override public MetadataDeleteJobExecution scheduleDelete(EntityType entityType) { return scheduleDelete(singletonList(entityType.getId())); } MetadataApiJobServiceImpl(
      MetadataUpsertJobExecutionFactory metadataUpsertJobExecutionFactory,
      MetadataDeleteJobExecutionFactory metadataDeleteJobExecutionFactory,
      JobExecutor jobExecutor,
      EntityTypeSerializer entityTypeSerializer); @Override MetadataUpsertJobExecution scheduleCreate(EntityType entityType); @Override MetadataUpsertJobExecution scheduleUpdate(EntityType entityType); @Override MetadataDeleteJobExecution scheduleDelete(EntityType entityType); @Override MetadataDeleteJobExecution scheduleDelete(Collection<EntityType> entityTypes);  }