public IceCreamOrder generate() {
    final IceCreamOrder order = new IceCreamOrder();
    final int nbBalls = peekBallsNumber();
    final int nbMixins = peekMixinNumber();

    IntStream.rangeClosed(1, nbBalls).mapToObj(i -> this.peekFlavor()).forEach(order::addBall);

    IntStream.rangeClosed(1, nbMixins).mapToObj(i -> this.peekMixin()).forEach(order::addMixin);

    return order;
  }
Generator of random ice cream orders.

@author Alexei KLENIN
vertx/feign-vertx/src/test/java/feign/vertx/testcase/domain/OrderGenerator.java