components/src/test/java/eu/internetofus/common/components/task_manager/TaskPredicates.java
/**
   * Check if the passed task is similar to the source task.
   *
   * @param source task to be similar.
   *
   * @return the predicate to check if a task is similar to another one.
   */
Check if the passed task is similar to the source task.
@param source task to be similar.

@return the predicate to check if a task is similar to another one.
Check if the passed task is similar to the source task . @param source task to be similar . @return the predicate to check if a task is similar to another one .
static Predicate<Task> similarTo(final Task source) {
    return target -> {
      if (source.taskTypeId != null && !source.taskTypeId.equals(target.taskTypeId)) {
        return false;
      }
      if (source.appId != null && !source.appId.equals(target.appId)) {
        return false;
      }
      if (source.communityId != null && !source.communityId.equals(target.communityId)) {
        return false;
      }
      if (source.requesterId != null && !source.requesterId.equals(target.requesterId)) {
        return false;
      }
      return true;
    };
  }
static Predicate < Task > similarTo ( final Task source ) { return target -> { if ( source . taskTypeId != null && ! source . taskTypeId . equals ( target . taskTypeId ) ) { return false ; } if ( source . appId != null && ! source . appId . equals ( target . appId ) ) { return false ; } if ( source . communityId != null && ! source . communityId . equals ( target . communityId ) ) { return false ; } if ( source . requesterId != null && ! source . requesterId . equals ( target . requesterId ) ) { return false ; } return true ; } ; }
Check if the passed task is similar to the source task.
Check if the passed task is similar to the source task .