components/src/test/java/eu/internetofus/common/components/profile_diversity_manager/WeNetProfileDiversityManagerTestCase.java
/**
   * Should not calculate the diversity with a bad agents data.
   *
   * @param vertx       that contains the event bus to use.
   * @param testContext context over the tests.
   */
Should not calculate the diversity with a bad agents data.
@param vertx       that contains the event bus to use.
@param testContext context over the tests.
Should not calculate the diversity with a bad agents data . @param vertx that contains the event bus to use . @param testContext context over the tests .
@Test
  public void shouldNotCalculateDiversityWithBadAgentsData(final Vertx vertx, final VertxTestContext testContext) {
    this.createComponentProxy(vertx).calculateDiversityOf(new JsonObject().put("undefinedField", "value"),
        testContext.succeeding(diversity -> testContext.verify(() -> {
          assertThat(diversity.getDouble("value", -1d)).isEqualTo(0.0d);
          testContext.completeNow();
        })));
  }
@ Test public void shouldNotCalculateDiversityWithBadAgentsData ( final Vertx vertx , final VertxTestContext testContext ) { this . createComponentProxy ( vertx ) . calculateDiversityOf ( new JsonObject ( ) . put ( "undefinedField" , "value" ) , testContext . succeeding ( diversity -> testContext . verify ( ( ) -> { assertThat ( diversity . getDouble ( "value" , - 1d ) ) . isEqualTo ( 0.0d ) ; testContext . completeNow ( ) ; } ) ) ) ; }
Should not calculate the diversity with a bad agents data.
Should not calculate the diversity with a bad agents data .