public int findAvailablePid(final int pid) throws TimeoutException {
    if (isProcessAlive(pid)) {
      return pid;
    }
    return findAvailablePid();
  }
Returns specified pid if it's unused. Else returns randomly unused pid between
{@code lowerBound} (inclusive) and {@code upperBound} (inclusive).
geode-junit/src/main/java/org/apache/geode/internal/process/lang/AvailablePid.java