Added the testCapacity method code