@Override
  public Object next() {
    if (_numberOfValuesPerEntry == 1) {
      return getNextBooleanAsInteger();
    }
    return MultiValueGeneratorHelper
        .generateMultiValueEntries(_numberOfValuesPerEntry, _random, this::getNextBooleanAsInteger);
  }
@Test
  public void testNextMultiValued() {
    Random random = mock(Random.class);
    when(random.nextBoolean())
        .thenReturn(false, true, false, false, false, true, true, true, true, false, true, false, false, true, true,
            false, false, false, true, true, false, true, true, true);
    when(random.nextDouble()).thenReturn(0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9); // for MV generation

    double numValuesPerEntry = 2.4;
    BooleanGenerator generator = new BooleanGenerator(numValuesPerEntry, random);
    int[][] expectedValues = {
        {0, 1, 0}, // rnd < 0.4
        {0, 0, 1}, // rnd < 0.4
        {1, 1, 1}, // rnd < 0.4
        {0, 1, 0}, // rnd < 0.4
        {0, 1},  // rnd >= 0.4
        {1, 0},  // rnd >= 0.4
        {0, 0},  // rnd >= 0.4
        {1, 1},  // rnd >= 0.4
        {0, 1},  // rnd >= 0.4
        {1, 1},  // rnd >= 0.4
    };
    for (int[] expected : expectedValues) {
      List<Integer> actual = (List<Integer>) generator.next();
      assertEquals(actual.toArray(), expected);
    }
  }