For task-2 I assume that max length of the random string will be 20. Correct random string can't be predicted easily but incorrect random string will be predictable like sequence of alphabet letter
To run the test case you can use make test
command. It will execute all test and show the coverage report.