components/src/test/java/eu/internetofus/common/components/models/TaskTest.java
/**
   * Check that merge when only is modified the {@link Task#requesterId}.
   *
   * @param vertx       event bus to use.
   * @param testContext context to test.
   *
   * @see Task#merge(Task, WeNetValidateContext)
   */
Check that merge when only is modified the  Task#requesterId.
@param vertx       event bus to use.
@param testContext context to test.


Check that merge when only is modified the Task#requesterId . @param vertx event bus to use . @param testContext context to test .
@Test
  public void shouldOnlyMergeRequesterId(final Vertx vertx, final VertxTestContext testContext) {
    this.createModelExample(1, vertx, testContext).onSuccess(targetToStore -> {
      StoreServices.storeTask(targetToStore, vertx, testContext).onSuccess(target -> {
        StoreServices.storeProfile(new WeNetUserProfile(), vertx, testContext).onSuccess(requester -> {
          final var source = new Task();
          source.requesterId = requester.id;
          assertCanMerge(target, source, new WeNetValidateContext("codePrefix", vertx), testContext, merged -> {
            assertThat(merged).isNotEqualTo(target).isNotEqualTo(source);
            target.requesterId = requester.id;
            assertThat(merged).isEqualTo(target).isNotEqualTo(source);
          });
        });
      });
    });
  }
@ Test public void shouldOnlyMergeRequesterId ( final Vertx vertx , final VertxTestContext testContext ) { this . createModelExample ( 1 , vertx , testContext ) . onSuccess ( targetToStore -> { StoreServices . storeTask ( targetToStore , vertx , testContext ) . onSuccess ( target -> { StoreServices . storeProfile ( new WeNetUserProfile ( ) , vertx , testContext ) . onSuccess ( requester -> { final var source = new Task ( ) ; source . requesterId = requester . id ; assertCanMerge ( target , source , new WeNetValidateContext ( "codePrefix" , vertx ) , testContext , merged -> { assertThat ( merged ) . isNotEqualTo ( target ) . isNotEqualTo ( source ) ; target . requesterId = requester . id ; assertThat ( merged ) . isEqualTo ( target ) . isNotEqualTo ( source ) ; } ) ; } ) ; } ) ; } ) ; }
Check that merge when only is modified the {@link Task#requesterId}.
Check that merge when only is modified the { @link Task#requesterId } .