@Test
public void nextIntTestDistribution() {

    int[] res = new int[6];
    int number;
    for (int i = 0; i < 1000; i++) {
        number = random.nextInt(6);
        res[number]++;
    }
    // each possibility should at least appear half of the perfect distribution ( =(1/6)/2 = 0.08... )
    assertTrue(res[0] / 1000d > 0.08);
    assertTrue(res[1] / 1000d > 0.08);
    assertTrue(res[2] / 1000d > 0.08);
    assertTrue(res[3] / 1000d > 0.08);
    assertTrue(res[4] / 1000d > 0.08);
    assertTrue(res[5] / 1000d > 0.08);
}