Removed hard coded ports from unit tests.

- Ports are chosen randomly. If they are already in use, try a
different port.