test and fix CCumulatedResourceCapacity