private static boolean testOneInterface(InetAddress addr, int port) {
    Keeper k = keepOneInterface(addr, port);
    if (k != null) {
      k.release();
      return true;
    } else {
      return false;
    }
  }
Returns whether or not the given port on the local host is available (that is, unused).

@param port The port to check
@param protocol The protocol to check (either {@link #SOCKET} or {@link #MULTICAST}).
@param addr the bind address (or mcast address) to use
@throws IllegalArgumentException <code>protocol</code> is unknown
geode-membership/src/main/java/org/apache/geode/internal/membership/utils/AvailablePort.java