code: public static void addFavorite(@Nonnull User user, @Nonnull Item item) throws FavoriteException {
          try {
              if (!isFavorite(user, item)) {
                  FavoriteUserProperty property = getProperty(user);
                  property.addFavorite(item.getFullName());
                  FavoriteListener.fireOnAddFavourite(item, user);
              } else {
                  throw new FavoriteException("Favourite is already set for User: <" + user.getFullName() + "> Item: <" + item.getFullName() + ">");
              }
          } catch (IOException e) {
              throw new FavoriteException("Could not add Favorite. User: <" + user.getFullName() + "> Item: <" + item.getFullName() + ">", e);
          }
      }
docs: Add an item as a favorite for a user
  Fires {@link FavoriteListener#fireOnAddFavourite(Item, User)}
  @param user to add the favorite to
  @param item to favorite
  @throws FavoriteException