During unit testing is is usually best to use ephemeral ports (ports > 1024 picked by the OS).