vertx/src/test/java/eu/internetofus/common/vertx/AbstractModelFieldResourcesIT.java
/**
   * Should retrieve empty list if field is {@code null}
   *
   * @param vertx       event bus to use.
   * @param client      to connect to the server.
   * @param testContext context to test.
   */
Should retrieve empty list if field is  null
@param vertx       event bus to use.
@param client      to connect to the server.
@param testContext context to test.
Should retrieve empty list if field is null @param vertx event bus to use . @param client to connect to the server . @param testContext context to test .
@Test
  public void shouldRetrieveEmptyFieldIfItIsNullOnModel(final Vertx vertx, final WebClient client,
      final VertxTestContext testContext) {
    testContext.assertComplete(this.storeValidExampleModelWithNullField(1, vertx, testContext)).onSuccess(model -> {
      final var path = this.modelPath() + "/" + this.idOfModel(model, testContext) + this.fieldPath();
      testRequest(client, HttpMethod.GET, path).expect(res -> {
        assertThat(res.statusCode()).isEqualTo(Status.OK.getStatusCode());
        final List<E> field = assertThatBodyIsArrayOf(this.fieldElementClass(), res);
        assertThat(field).isNotNull().isEmpty();
      }).send(testContext);
    });
  }
@ Test public void shouldRetrieveEmptyFieldIfItIsNullOnModel ( final Vertx vertx , final WebClient client , final VertxTestContext testContext ) { testContext . assertComplete ( this . storeValidExampleModelWithNullField ( 1 , vertx , testContext ) ) . onSuccess ( model -> { final var path = this . modelPath ( ) + "/" + this . idOfModel ( model , testContext ) + this . fieldPath ( ) ; testRequest ( client , HttpMethod . GET , path ) . expect ( res -> { assertThat ( res . statusCode ( ) ) . isEqualTo ( Status . OK . getStatusCode ( ) ) ; final List < E > field = assertThatBodyIsArrayOf ( this . fieldElementClass ( ) , res ) ; assertThat ( field ) . isNotNull ( ) . isEmpty ( ) ; } ) . send ( testContext ) ; } ) ; }
Should retrieve empty list if field is {@code null}
 @param vertx       event bus to use.
Should retrieve empty list if field is { @code null } @param vertx event bus to use .