protocols/src/test/java/eu/internetofus/common/protocols/AbstractProtocolITC.java
/**
   * Create the predicate over an user state with the data from the test.
   *
   * @param userId identifier of the user.
   *
   * @return the predicate for the user state.
   *
   * @see #app
   * @see #task
   * @see #community
   */
Create the predicate over an user state with the data from the test.
@param userId identifier of the user.

@return the predicate for the user state.


Create the predicate over an user state with the data from the test . @param userId identifier of the user . @return the predicate for the user state .
protected Predicate<State> createUserStatePredicate(@NotNull final String userId) {
    return state -> {
      if (!userId.equals(state.userId)) {
        return false;
      }
      if (state.taskId != null) {
        return false;
      }
      if (state.communityId != null) {
        return false;
      }
      return true;
    };
  }
protected Predicate < State > createUserStatePredicate ( @ NotNull final String userId ) { return state -> { if ( ! userId . equals ( state . userId ) ) { return false ; } if ( state . taskId != null ) { return false ; } if ( state . communityId != null ) { return false ; } return true ; } ; }
Create the predicate over an user state with the data from the test.
Create the predicate over an user state with the data from the test .