@Test public void shouldGenerateRandomBooleans() throws Exception { Set<Boolean> generatedValues = newHashSet(); for (int i = 0; i < 100; i++) { generatedValues.add(generator.next()); } assertThat(generatedValues, containsInAnyOrder(true, false)); }
@Override public Boolean next() { return RANDOM.nextBoolean(); }
RandomBooleanGenerator implements Generator<Boolean> { @Override public Boolean next() { return RANDOM.nextBoolean(); } }
RandomBooleanGenerator implements Generator<Boolean> { @Override public Boolean next() { return RANDOM.nextBoolean(); }  }
RandomBooleanGenerator implements Generator<Boolean> { @Override public Boolean next() { return RANDOM.nextBoolean(); }  @Override Boolean next(); }
RandomBooleanGenerator implements Generator<Boolean> { @Override public Boolean next() { return RANDOM.nextBoolean(); }  @Override Boolean next();  }