model/src/test/java/eu/internetofus/common/model/ModelTest.java
/**
   * Check that the future fail if the object is not of the specified class.
   *
   * @param testContext context for the test.
   *
   * @see Model#fromFutureJsonObject(io.vertx.core.Future, Class)
   */
Check that the future fail if the object is not of the specified class.
@param testContext context for the test.


Check that the future fail if the object is not of the specified class . @param testContext context for the test .
@Test
  public void shouldFutureFailBecauseNotValidModel(final VertxTestContext testContext) {
    testContext
        .assertFailure(Model.fromFutureJsonObject(
            Future.succeededFuture(new JsonObject().put("index", new JsonArray())), DummyModel.class))
        .onFailure(result -> testContext.completeNow());
  }
@ Test public void shouldFutureFailBecauseNotValidModel ( final VertxTestContext testContext ) { testContext . assertFailure ( Model . fromFutureJsonObject ( Future . succeededFuture ( new JsonObject ( ) . put ( "index" , new JsonArray ( ) ) ) , DummyModel . class ) ) . onFailure ( result -> testContext . completeNow ( ) ) ; }
Check that the future fail if the object is not of the specified class.
Check that the future fail if the object is not of the specified class .