@Test void nextEnumShouldNotAlwaysReturnTheSameValue() { HashSet<TestEnum> distinctEnumBeans = new HashSet<>(); for (int i = 0; i < 10; i++) { distinctEnumBeans.add(easyRandom.nextObject(TestEnum.class)); } assertThat(distinctEnumBeans.size()).isGreaterThan(1); }
public <T> T nextObject(final Class<T> type) { return doPopulateBean(type, new RandomizationContext(type, parameters)); }
EasyRandom extends Random { public <T> T nextObject(final Class<T> type) { return doPopulateBean(type, new RandomizationContext(type, parameters)); } }
EasyRandom extends Random { public <T> T nextObject(final Class<T> type) { return doPopulateBean(type, new RandomizationContext(type, parameters)); } EasyRandom();  EasyRandom(final EasyRandomParameters easyRandomParameters); }
EasyRandom extends Random { public <T> T nextObject(final Class<T> type) { return doPopulateBean(type, new RandomizationContext(type, parameters)); } EasyRandom();  EasyRandom(final EasyRandomParameters easyRandomParameters); T nextObject(final Class<T> type); Stream<T> objects(final Class<T> type, final int streamSize); }
EasyRandom extends Random { public <T> T nextObject(final Class<T> type) { return doPopulateBean(type, new RandomizationContext(type, parameters)); } EasyRandom();  EasyRandom(final EasyRandomParameters easyRandomParameters); T nextObject(final Class<T> type); Stream<T> objects(final Class<T> type, final int streamSize);  }