assertInstanceOf("Build can not start because previous build has not finished: "+p.getCauseOfBlockage(),p.getCauseOfBlockage(),BecauseOfBuildInProgress.class);
assertTrue("Build can not start because build of downstream project has not finished.",p.getCauseOfBlockage()instanceofBecauseOfDownstreamBuildInProgress);
assertInstanceOf("Build can not start because build of downstream project has not finished.",p.getCauseOfBlockage(),BecauseOfDownstreamBuildInProgress.class);
assertTrue("Build can not start because build of upstream project has not finished.",downstream.getCauseOfBlockage()instanceofBecauseOfUpstreamBuildInProgress);
waitForStart(p);
assertInstanceOf("Build can not start because build of upstream project has not finished.",downstream.getCauseOfBlockage(),BecauseOfUpstreamBuildInProgress.class);