// make sure that port is there after broker restart
stopBroker();
// We shouldn't need to await the ports to be free, but it seems sometimes an RMI TCP Accept
// thread is seen to close the socket *after* the broker has finished stopping.
new PortHelper().waitUntilPortsAreFree(new HashSet<Integer>(Arrays.asList(jmxPort, rmiPort)));
startBroker();
portDetails = getRestTestHelper().getJsonAsList("port/" + portNameRMI);
assertNotNull("Port details cannot be null", portDetails);