// Prepare the record for "friendship" table.
  // inviterid, inviteeid, status.
  private void addFriends(DB db, int dbKey, int keyNum) {
    int res = 0;
    // Generate the fields using StringByteIterator and RandomByteIterator.
    if (friendPercentage * (random.nextInt(userCount) + 1) >= 1.0f) {
      res = db.inviteFriend(dbKey, keyNum); // data = new StringByteIterator("1"); // Pending.
    } else {
      res = db.CreateFriendship(dbKey, keyNum); // data = new StringByteIterator("2"); // Already.
    }

    if (res < 0) {
      System.out.println(
          "The creation of the friendship relationship failes. "
              + "Please make sure the appropriate schema has been created "
              + " and the users have been inserted.");
      System.exit(-1);
    }
  }