@Test void testScheduleUpdate() { EntityType entityType = mock(EntityType.class); MetadataUpsertJobExecution jobExecution = mock(MetadataUpsertJobExecution.class); when(metadataUpsertJobExecutionFactory.create()).thenReturn(jobExecution); when(entityTypeSerializer.serializeEntityType(entityType)).thenReturn("entity data"); MetadataUpsertJobExecution actualJobExecution = metadataApiJobService.scheduleUpdate(entityType); assertAll( () -> assertEquals(jobExecution, actualJobExecution), () -> verify(jobExecution).setAction(Action.UPDATE), () -> verify(jobExecution).setEntityTypeData("entity data"), () -> verify(jobExecutor).submit(jobExecution)); }
@Override public MetadataUpsertJobExecution scheduleUpdate(EntityType entityType) { return scheduleUpsert(Action.UPDATE, entityType); }
MetadataApiJobServiceImpl implements MetadataApiJobService { @Override public MetadataUpsertJobExecution scheduleUpdate(EntityType entityType) { return scheduleUpsert(Action.UPDATE, entityType); } }
MetadataApiJobServiceImpl implements MetadataApiJobService { @Override public MetadataUpsertJobExecution scheduleUpdate(EntityType entityType) { return scheduleUpsert(Action.UPDATE, entityType); } MetadataApiJobServiceImpl(
      MetadataUpsertJobExecutionFactory metadataUpsertJobExecutionFactory,
      MetadataDeleteJobExecutionFactory metadataDeleteJobExecutionFactory,
      JobExecutor jobExecutor,
      EntityTypeSerializer entityTypeSerializer); }
MetadataApiJobServiceImpl implements MetadataApiJobService { @Override public MetadataUpsertJobExecution scheduleUpdate(EntityType entityType) { return scheduleUpsert(Action.UPDATE, entityType); } 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 MetadataUpsertJobExecution scheduleUpdate(EntityType entityType) { return scheduleUpsert(Action.UPDATE, entityType); } 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);  }