test cases written as per requirements

test cases written as per requirements. Added Logic for primes and added
test cases to cover negative scenarios.