@Test
public void testRmiRestart() throws IOException, InterruptedException {

	Properties props = new Properties();
	int port = 11987;
	props.put("jmx.rmi.port", String.valueOf(port));
	JmxConnector jmxConnector = JmxRmi.init(props);
	Assert.assertNotNull(jmxConnector);
	jmxConnector.stop();
	waitForSocket(port);
	// no exception is thrown: java.rmi.server.ExportException: internal error: ObjID already in use
	jmxConnector = JmxRmi.init(props);
	Assert.assertNotNull(jmxConnector);
	jmxConnector.stop();
}