SI-7006 Fix the unreachable test

The unreachable test was missing the cases when Random.nextInt returned
a negative number. This commit fixes that.