vertx/src/test/java/eu/internetofus/common/vertx/ServiceResponseHandlersTest.java
/**
   * Check the response with a {@link Model}.
   *
   * @param testContext context that executes the test.
   */
Check the response with a  Model.
@param testContext context that executes the test.
Check the response with a Model . @param testContext context that executes the test .
@Test
  public void shouldRepondWithModel(final VertxTestContext testContext) {
    ServiceResponseHandlers.responseWith(testContext.succeeding(reponse -> testContext.verify(() -> {
      assertThat(reponse.getStatusCode()).isEqualTo(Status.ACCEPTED.getStatusCode());
      assertThat(reponse.getHeaders().get(HttpHeaders.CONTENT_TYPE)).isEqualTo(MediaType.APPLICATION_JSON);
      assertThat(reponse.getPayload().toString()).isEqualTo("{\"index\":0}");
      testContext.completeNow();
    })), Status.ACCEPTED, new DummyModel());
  }
@ Test public void shouldRepondWithModel ( final VertxTestContext testContext ) { ServiceResponseHandlers . responseWith ( testContext . succeeding ( reponse -> testContext . verify ( ( ) -> { assertThat ( reponse . getStatusCode ( ) ) . isEqualTo ( Status . ACCEPTED . getStatusCode ( ) ) ; assertThat ( reponse . getHeaders ( ) . get ( HttpHeaders . CONTENT_TYPE ) ) . isEqualTo ( MediaType . APPLICATION_JSON ) ; assertThat ( reponse . getPayload ( ) . toString ( ) ) . isEqualTo ( "{\"index\":0}" ) ; testContext . completeNow ( ) ; } ) ) , Status . ACCEPTED , new DummyModel ( ) ) ; }
Check the response with a {@link Model}.
Check the response with a { @link Model } .