Tests to method areThereEnoughResourcesToAllocate and changes in method
body.