control.replay();
buildScheduler();
// Schedule 5 service and 5 non-service tasks.
scheduler.createJob(makeJob(adhocKey, numServiceTasks));
TaskConfig task = productionTask().setIsService(true);
scheduler.createJob(makeJob(serviceKey, task, 5));
assertEquals(10, getTasksByStatus(PENDING).size());
changeStatus(Query.roleScoped(ROLE_A), ASSIGNED, STARTING);
assertEquals(10, getTasksByStatus(STARTING).size());