components/src/test/java/eu/internetofus/common/components/profile_manager/WeNetProfileManagers.java
/**
   * Create user for the test.
   *
   * @param maxUsers    number of users to create.
   * @param vertx       event bus to use.
   * @param testContext context to do the test.
   *
   * @return the future that will return the created users.
   */
Create user for the test.
@param maxUsers    number of users to create.
@param vertx       event bus to use.
@param testContext context to do the test.

@return the future that will return the created users.
Create user for the test . @param maxUsers number of users to create . @param vertx event bus to use . @param testContext context to do the test . @return the future that will return the created users .
static Future<List<WeNetUserProfile>> createUsers(final int maxUsers, final Vertx vertx, final VertxTestContext testContext) {
    final Promise<List<WeNetUserProfile>> promise = Promise.promise();
    var future = promise.future();
    for (var i = 0; i < maxUsers; i++) {
      future = future.compose(users -> {
        return StoreServices.storeProfile(new WeNetUserProfile(), vertx, testContext).compose(profile -> {
          users.add(profile);
          return Future.succeededFuture(users);
        });
      });
    }
    promise.complete(new ArrayList<>());
    return future;
  }
static Future < List < WeNetUserProfile > > createUsers ( final int maxUsers , final Vertx vertx , final VertxTestContext testContext ) { final Promise < List < WeNetUserProfile > > promise = Promise . promise ( ) ; var future = promise . future ( ) ; for ( var i = 0 ; i < maxUsers ; i ++ ) { future = future . compose ( users -> { return StoreServices . storeProfile ( new WeNetUserProfile ( ) , vertx , testContext ) . compose ( profile -> { users . add ( profile ) ; return Future . succeededFuture ( users ) ; } ) ; } ) ; } promise . complete ( new ArrayList < > ( ) ) ; return future ; }
Create user for the test.
Create user for the test .