Add solution and tests for isPrime