// sorting on multiple fields
setRetries(processInstanceIdTwo, 2);
ClockUtil.setCurrentTime(new Date(timerThreeFireTime.getTime() + ONE_SECOND)); // make sure all timers can fire
JobQuery query = managementService.createJobQuery()
.timers()
.executable()
.orderByJobRetries()
.asc()
.orderByJobDuedate()
.desc();
List<Job> jobs = query.list();
assertEquals(3, jobs.size());
assertEquals(2, jobs.get(0).getRetries());
assertEquals(3, jobs.get(1).getRetries());
assertEquals(3, jobs.get(2).getRetries());