managementService.activateJobByJobDefinitionId(jobDefinition.getId());
// then
// the job should be activated
assertEquals(0, jobQuery.suspended().count());
assertEquals(1, jobQuery.active().count());
Job activeJob = jobQuery.active().singleResult();
assertEquals(job.getId(), activeJob.getId());
assertEquals(jobDefinition.getId(), activeJob.getJobDefinitionId());