model/src/test/java/eu/internetofus/common/model/ModelTest.java
/**
   * Check get model from response.
   *
   * @param response the mocked response.
   */
Check get model from response.
@param response the mocked response.
Check get model from response . @param response the mocked response .
@Test
  public void shouldGetnodelFromResponse(@Mock final HttpResponse<Buffer> response) {
    final var model = new DummyModelTest().createModelExample(2);
    doReturn(model.toBuffer()).when(response).bodyAsBuffer();
    assertThat(Model.fromResponse(response, DummyModel.class)).isEqualTo(model);
  }
@ Test public void shouldGetnodelFromResponse ( @ Mock final HttpResponse < Buffer > response ) { final var model = new DummyModelTest ( ) . createModelExample ( 2 ) ; doReturn ( model . toBuffer ( ) ) . when ( response ) . bodyAsBuffer ( ) ; assertThat ( Model . fromResponse ( response , DummyModel . class ) ) . isEqualTo ( model ) ; }
Check get model from response.
Check get model from response .