components/src/test/java/eu/internetofus/common/components/models/WeNetUserProfileTest.java
/**
   * Check that the model is not valid it has two relevant locations with the same
   * identifier.
   *
   * @param vertx       event bus to use.
   * @param testContext context to test.
   *
   * @see WeNetUserProfile#validate(WeNetValidateContext)
   */
Check that the model is not valid it has two relevant locations with the same
identifier.

@param vertx       event bus to use.
@param testContext context to test.


Check that the model is not valid it has two relevant locations with the same identifier . @param vertx event bus to use . @param testContext context to test .
@Test
  public void shouldNotValidWithDuplicatedRelevantLocations(final Vertx vertx, final VertxTestContext testContext) {
    final var model = new WeNetUserProfile();
    model.relevantLocations = new ArrayList<>();
    for (var i = 0; i < 2; i++) {
      model.relevantLocations.add(new RelevantLocationTest().createModelExample(i));
      model.relevantLocations.get(i).id = "Duplicated Identifier";
    }
    assertIsNotValid(model, "relevantLocations[1]", new WeNetValidateContext("codePrefix", vertx), testContext);
  }
@ Test public void shouldNotValidWithDuplicatedRelevantLocations ( final Vertx vertx , final VertxTestContext testContext ) { final var model = new WeNetUserProfile ( ) ; model . relevantLocations = new ArrayList < > ( ) ; for ( var i = 0 ; i < 2 ; i ++ ) { model . relevantLocations . add ( new RelevantLocationTest ( ) . createModelExample ( i ) ) ; model . relevantLocations . get ( i ) . id = "Duplicated Identifier" ; } assertIsNotValid ( model , "relevantLocations[1]" , new WeNetValidateContext ( "codePrefix" , vertx ) , testContext ) ; }
Check that the model is not valid it has two relevant locations with the same
 identifier.
Check that the model is not valid it has two relevant locations with the same identifier .