HypervisorUpdateJob implements AsyncJob { public static HypervisorUpdateJobConfig createJobConfig() { return new HypervisorUpdateJobConfig(); } @Inject  HypervisorUpdateJob(
        final OwnerCurator ownerCurator,
        final ConsumerCurator consumerCurator,
        final ModelTranslator translator,
        final HypervisorUpdateAction hypervisorUpdateAction,
        final I18n i18n,
        @Named("HypervisorUpdateJobObjectMapper") final ObjectMapper objectMapper); static HypervisorUpdateJobConfig createJobConfig(); @Override void execute(final JobExecutionContext context); static final String JOB_KEY; static final String JOB_NAME; }
@Test public void createJobDetail() { JobConfig config = createJobConfig(null); assertDoesNotThrow(config::validate); }
@Test public void ownerMustBePresent() { JobConfig config = HypervisorUpdateJob.createJobConfig() .setData(hypervisorJson) .setCreateMissing(true) .setPrincipal(principal) .setReporter(null); assertThrows(JobConfigValidationException.class, config::validate); }
@Test public void createFlagMustBePresent() { JobConfig config = HypervisorUpdateJob.createJobConfig() .setOwner(owner) .setData(hypervisorJson) .setPrincipal(principal) .setReporter(null); assertThrows(JobConfigValidationException.class, config::validate); }
@Test public void hypervisorDataMustBePresent() { JobConfig config = HypervisorUpdateJob.createJobConfig() .setOwner(owner) .setCreateMissing(true) .setPrincipal(principal) .setReporter(null); assertThrows(JobConfigValidationException.class, config::validate); }