package au.id.zancanaro; import org.junit.Assert; import org.junit.Test; import java.util.Random; public class SimpleGenerator { @Test public void testSimpleGeneratorFlatmap() throws Exception { Generator generator = Generator .pure(10) .flatMap((value) -> Generator.pure(value + 10)); Assert.assertEquals( (Object) 20, generator.generate(null, 0).getValue()); } }