@Test
public void nextBooleanTestDistribution() {

    int[] res = new int[2];
    boolean value;
    for (int i = 0; i < 100; i++) {
        value = random.nextBoolean();
        if (value) {
            res[0]++;
        } else {
            res[1]++;
        }
    }
    // each possibility should at least appear half of the perfect distribution ( =(1/2)/2 = 0.25)
    assertTrue(res[0] / 100d > 0.25);
    assertTrue(res[1] / 100d > 0.25);
}