Implemented limitedInfection and its test.