components/src/test/java/eu/internetofus/common/components/task_manager/TaskPredicates.java
/**
   * Return a predicate the check that the task contains the specified
   * transaction.
   *
   * @param checkTransaction predicate to satisfy by at least one transaction.
   *
   * @return the predicate to check exist at least one transaction satisfy the
   *         predicate.
   */
Return a predicate the check that the task contains the specified
transaction.

@param checkTransaction predicate to satisfy by at least one transaction.

@return the predicate to check exist at least one transaction satisfy the
predicate.
Return a predicate the check that the task contains the specified transaction . @param checkTransaction predicate to satisfy by at least one transaction . @return the predicate to check exist at least one transaction satisfy the predicate .
static Predicate<Task> containsTransaction(final Predicate<TaskTransaction> checkTransaction) {
    return target -> {
      if (target.transactions != null && !target.transactions.isEmpty()) {
        for (final var transaction : target.transactions) {
          if (checkTransaction.test(transaction)) {
            return true;
          }
        }
      }
      return false;
    };
  }
static Predicate < Task > containsTransaction ( final Predicate < TaskTransaction > checkTransaction ) { return target -> { if ( target . transactions != null && ! target . transactions . isEmpty ( ) ) { for ( final var transaction : target . transactions ) { if ( checkTransaction . test ( transaction ) ) { return true ; } } } return false ; } ; }
Return a predicate the check that the task contains the specified
 transaction.
Return a predicate the check that the task contains the specified transaction .