components/src/test/java/eu/internetofus/common/components/interaction_protocol_engine/AbstractProtocolActionTestCase.java
/**
   * Create an example model that has the specified index that create any required
   * component.
   *
   * @param index       to use in the example.
   * @param vertx       event bus to use.
   * @param testContext context to test.
   *
   * @return the created protocol event.
   */
Create an example model that has the specified index that create any required
component.

@param index       to use in the example.
@param vertx       event bus to use.
@param testContext context to test.

@return the created protocol event.
Create an example model that has the specified index that create any required component . @param index to use in the example . @param vertx event bus to use . @param testContext context to test . @return the created protocol event .
public Future<T> createModelExample(final int index, final Vertx vertx, final VertxTestContext testContext) {
    return testContext
        .assertComplete(new TaskTransactionTest().createModelExample(index, vertx, testContext).compose(transaction -> {
          return WeNetTaskManager.createProxy(vertx).addTransactionIntoTask(transaction.taskId, transaction)
              .compose(addedTransaction -> {
                return WeNetTaskManager.createProxy(vertx).retrieveTask(transaction.taskId).compose(task -> {
                  final var model = this.createModelExample(index);
                  model.appId = task.appId;
                  model.communityId = task.communityId;
                  model.taskId = task.id;
                  model.transactionId = addedTransaction.id;
                  return Future.succeededFuture(model);
                });
              });
        }));
  }
public Future < T > createModelExample ( final int index , final Vertx vertx , final VertxTestContext testContext ) { return testContext . assertComplete ( new TaskTransactionTest ( ) . createModelExample ( index , vertx , testContext ) . compose ( transaction -> { return WeNetTaskManager . createProxy ( vertx ) . addTransactionIntoTask ( transaction . taskId , transaction ) . compose ( addedTransaction -> { return WeNetTaskManager . createProxy ( vertx ) . retrieveTask ( transaction . taskId ) . compose ( task -> { final var model = this . createModelExample ( index ) ; model . appId = task . appId ; model . communityId = task . communityId ; model . taskId = task . id ; model . transactionId = addedTransaction . id ; return Future . succeededFuture ( model ) ; } ) ; } ) ; } ) ) ; }
Create an example model that has the specified index that create any required
 component.
Create an example model that has the specified index that create any required component .