ActiveEntitlementJob implements AsyncJob { @Inject public ActiveEntitlementJob(ConsumerCurator consumerCurator, ComplianceRules complianceRules, SystemPurposeComplianceRules systemPurposeComplianceRules) { this.consumerCurator = consumerCurator; this.complianceRules = complianceRules; this.systemPurposeComplianceRules = systemPurposeComplianceRules; } @Inject  ActiveEntitlementJob(ConsumerCurator consumerCurator, ComplianceRules complianceRules,
        SystemPurposeComplianceRules systemPurposeComplianceRules); @Override void execute(JobExecutionContext context); static final String JOB_KEY; static final String JOB_NAME; static final String DEFAULT_SCHEDULE; }
@Test public void testActiveEntitlementJob() throws JobExecutionException { Pool p = createPool(owner, prod, 5L, Util.yesterday(), Util.tomorrow()); Entitlement ent = this .createEntitlement(owner, consumer, p, createEntitlementCertificate("entkey", "ecert")); ent.setUpdatedOnStart(false); entitlementCurator.create(ent); consumerCurator.refresh(consumer); assertNotEquals("valid", consumer.getEntitlementStatus()); JobExecutionContext context = mock(JobExecutionContext.class); job.execute(context); consumerCurator.flush(); consumerCurator.refresh(consumer); assertEquals("valid", consumer.getEntitlementStatus()); assertTrue(entitlementCurator.get(ent.getId()).isUpdatedOnStart()); }