model/src/test/java/eu/internetofus/common/model/ModelTest.java
/**
   * Check that can get model from future.
   *
   * @param testContext context for the test.
   *
   * @see Model#fromFutureJsonObject(io.vertx.core.Future, Class)
   */
Check that can get model from future.
@param testContext context for the test.


Check that can get model from future . @param testContext context for the test .
@Test
  public void shouldGetModelFromFuture(final VertxTestContext testContext) {
    final var model = new DummyModelTest().createModelExample(2);
    final var object = model.toJsonObject();
    Model.fromFutureJsonObject(Future.succeededFuture(object), DummyModel.class)
        .onComplete(testContext.succeeding(target -> testContext.verify(() -> {
          assertThat(target).isEqualTo(model);
          testContext.completeNow();
        })));
  }
@ Test public void shouldGetModelFromFuture ( final VertxTestContext testContext ) { final var model = new DummyModelTest ( ) . createModelExample ( 2 ) ; final var object = model . toJsonObject ( ) ; Model . fromFutureJsonObject ( Future . succeededFuture ( object ) , DummyModel . class ) . onComplete ( testContext . succeeding ( target -> testContext . verify ( ( ) -> { assertThat ( target ) . isEqualTo ( model ) ; testContext . completeNow ( ) ; } ) ) ) ; }
Check that can get model from future.
Check that can get model from future .