code: public static boolean hasFavorite(@Nonnull User user, @Nonnull Item item) throws FavoriteException {
          try {
              FavoriteUserProperty property = getProperty(user);
              return property.hasFavorite(item.getFullName());
          } catch (IOException e) {
              throw new FavoriteException("Could not determine Favorite state. User: <" + user.getFullName() + "> Item: <" + item.getFullName() + ">", e);
          }
      }
docs: Check if the item has a favorite entry regardless of its state
  This is useful for checking if a favorite/unfavorite operation has ever been performed against this user
  @param user to check
  @param item to check
  @return favorite state
  @throws FavoriteException