Adds nextPrime and tests