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 shouldNotValidWithDuplicatedPersonalBehaviors(final Vertx vertx, final VertxTestContext testContext) {
    new RoutineTest().createModelExample(1, vertx, testContext).onSuccess(routine -> {
      final var model = new WeNetUserProfile();
      model.personalBehaviors = new ArrayList<>();
      model.personalBehaviors.add(routine);
      model.personalBehaviors.add(Model.fromJsonObject(routine.toJsonObject(), Routine.class));
      assertIsNotValid(model, "personalBehaviors[1]", new WeNetValidateContext("codePrefix", vertx), testContext);
    });
  }
@ Test public void shouldNotValidWithDuplicatedPersonalBehaviors ( final Vertx vertx , final VertxTestContext testContext ) { new RoutineTest ( ) . createModelExample ( 1 , vertx , testContext ) . onSuccess ( routine -> { final var model = new WeNetUserProfile ( ) ; model . personalBehaviors = new ArrayList < > ( ) ; model . personalBehaviors . add ( routine ) ; model . personalBehaviors . add ( Model . fromJsonObject ( routine . toJsonObject ( ) , Routine . class ) ) ; assertIsNotValid ( model , "personalBehaviors[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 .