Javadoc
Sets up the port range to be used. In typical usage, Ant invokes JUnit,
possibly using multiple JUnit processes to execute multiple test suites
concurrently. The count of JUnit processes is passed from Ant as a system
property named "test.junit.threads". Ant's JUnit runner receives the
thread ID as a command line argument of the form threadid=N, where N is an
integer in the range [1, ${test.junit.threads}]. It's not otherwise
accessible, so we need to parse it from the command line. This method
uses these 2 pieces of information to split the available ports into
disjoint ranges. Each JUnit process only assigns ports from its own range
in order to prevent bind errors during concurrent test runs. If any of
this information is unavailable or unparseable, then the default behavior
is for this process to use the entire available port range. This is
expected when running tests outside of Ant.