When running the JUnit tests, we sometimes need a network port (e.g. to run an ActiveMQ broker) to be available. We should either avoid that we need the port or else dynamically assign a port to ensure things work fine (especially on CI build boxes when running multiple builds).
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path resource [org/apache/servicemix/jbi/nmr/flow/jca/broker.xml]:
Invocation of init method failed; nested exception is java.io.IOException: Failed to bind to server socket: tcp://localhost:61216 due to:
java.net.BindException: The socket name is already in use.