I made a few changes as I was reviewing the last patch by Rahul, and am attaching a new patch with those.
The changes are mainly in the area of making checkMultipleTaskAssignment to be more strict in checking the tasks expected and returned. In particular, I am now failing the test if a task is scheduled when it should not be. This necessitated that all tasks returned by the scheduler are checked, even for the overloaded method checkAssignment, and correspondingly tests in TestCapacityScheduler needed to be changed so that it uses multiple task assignment checks where appropriate. I remember changing all the user limit tests and testClusterBlockingForLackOfMemory to accomodate this.
Other than this, I verified other changes are fine. So, I am pushing this patch through Hudson.