docs: @VisibleForTesting
    static int chooseTableSize(int setSize) {
      if (setSize == 1) {
        return 2;
      }
      // Correct the size for open addressing to match desired load factor.
      // Round up to the next highest power of 2.
      int tableSize = Integer.highestOneBit(setSize - 1) << 1;
      while (tableSize * DESIRED_LOAD_FACTOR < setSize) {
        tableSize <<= 1;
      }
      return tableSize;
    }