public void dependencies() throws Exception {
Map<String, String> conf = new HashMap<String, String>();
ServiceProfile<JobScheduler> profile = new ServiceProfile<JobScheduler>(
"testing", BasicJobScheduler.class, conf, ProfileContext.system(getClass().getClassLoader()));
JobScheduler instance = profile.newInstance();
AtomicInteger group = new AtomicInteger();
List<Mock> jobs = new ArrayList<Mock>();
jobs.add(new Mock(group, "b", "a"));
jobs.add(new Mock(group, "d", "b", "c"));
jobs.add(new Mock(group, "a"));
jobs.add(new Mock(group, "c", "a"));
instance.execute(PhaseMonitor.NULL, CONTEXT, jobs, JobScheduler.STRICT);
Set<String> rest = collectRest(jobs);
assertThat(rest.size(), is(0));
assertThat(ordinary(jobs, "a"), lessThan(ordinary(jobs, "b")));
assertThat(ordinary(jobs, "a"), lessThan(ordinary(jobs, "c")));