components/src/test/java/eu/internetofus/common/components/models/RoutineTest.java
/**
   * Check that a {@link Routine} with a bad scored label in the
   * label_distribution is not valid.
   *
   * @param vertx       event bus to use.
   * @param testContext test context to use.
   *
   * @see Routine#validate(WeNetValidateContext)
   */
Check that a  Routine with a bad scored label in the
label_distribution is not valid.

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


Check that a Routine with a bad scored label in the label_distribution is not valid . @param vertx event bus to use . @param testContext test context to use .
@Test
  public void shouldRoutineWithABadScoredLabelArrayInLabel_distributiondNotBeValid(final Vertx vertx,
      final VertxTestContext testContext) {
    this.createModelExample(1, vertx, testContext).onSuccess(model -> {
      model.label_distribution.put("bad_score_label",
          new JsonArray().add(new ScoredLabelTest().createModelExample(1).toJsonObject())
              .add(new ScoredLabelTest().createModelExample(2).toJsonObject().putNull("label")));
      assertIsNotValid(model, "label_distribution.bad_score_label[1].label",
          new WeNetValidateContext("codePrefix", vertx), testContext);
    });
  }
@ Test public void shouldRoutineWithABadScoredLabelArrayInLabel_distributiondNotBeValid ( final Vertx vertx , final VertxTestContext testContext ) { this . createModelExample ( 1 , vertx , testContext ) . onSuccess ( model -> { model . label_distribution . put ( "bad_score_label" , new JsonArray ( ) . add ( new ScoredLabelTest ( ) . createModelExample ( 1 ) . toJsonObject ( ) ) . add ( new ScoredLabelTest ( ) . createModelExample ( 2 ) . toJsonObject ( ) . putNull ( "label" ) ) ) ; assertIsNotValid ( model , "label_distribution.bad_score_label[1].label" , new WeNetValidateContext ( "codePrefix" , vertx ) , testContext ) ; } ) ; }
Check that a {@link Routine} with a bad scored label in the
 label_distribution is not valid.
Check that a { @link Routine } with a bad scored label in the label_distribution is not valid .