Made modifications to the testPrime() method