When randomness is involved in output of a method, instead of checking values, you can validate the structure of the output.
For your example, the validation method would check that:
3 lines are returned
1st line contains exactly 5 numbers which all are from 1 to 6
2nd line is total of each 5 numbers from previous line