docs: private static int createAcceptablePort() {
      synchronized (random) {
        final int FIRST_PORT;
        final int LAST_PORT;
  
        int freeAbove = HIGHEST_PORT - ephemeralRangeDetector.getHighestEphemeralPort();
        int freeBelow = max(0, ephemeralRangeDetector.getLowestEphemeralPort() - START_OF_USER_PORTS);
  
        if (freeAbove > freeBelow) {
          FIRST_PORT = ephemeralRangeDetector.getHighestEphemeralPort();
          LAST_PORT = 65535;
        } else {
          FIRST_PORT = 1024;
          LAST_PORT = ephemeralRangeDetector.getLowestEphemeralPort();
        }
  
        if (FIRST_PORT == LAST_PORT) {
          return FIRST_PORT;
        }
        if (FIRST_PORT > LAST_PORT) {
          throw new UnsupportedOperationException("Could not find ephemeral port to use");
        }
        final int randomInt = random.nextInt();
        final int portWithoutOffset = Math.abs(randomInt % (LAST_PORT - FIRST_PORT + 1));
        return portWithoutOffset + FIRST_PORT;
      }
    }