params.put("fail", Boolean.TRUE);
runtimeService.startProcessInstanceByKey("suspensionProcess", params);
// the failed job
JobQuery jobQuery = managementService.createJobQuery();
Job job = jobQuery.singleResult();
assertFalse(job.isSuspended());
// when
// the job will be suspended
managementService.suspendJobByProcessDefinitionKey(processDefinition.getKey());