projectB.getBuildersList().add(builder);
projectB.setQuietPeriod(1);
projectA.getPublishersList().add(new BuildTrigger(
new BuildTriggerConfig("projectB", ResultCondition.SUCCESS,
new CurrentBuildParameters(),
new PredefinedBuildParameters("BAZ=moo\nHOHO=blah"))));
hudson.rebuildDependencyGraph();
Run r = (Run)projectA.scheduleBuild2(0, new UserCause(), new ParametersAction(
new StringParameterValue("BAR", "foo"),
new StringParameterValue("BAZ", "override-me"))).get();
Queue.Item q = hudson.getQueue().getItem(projectB);