Socket socket = context.socket(ZMQ.REP);
Socket monitor = context.socket(ZMQ.PAIR);
monitor.setReceiveTimeOut(100);
assertTrue(socket.monitor("inproc://monitor.socket", ZMQ.EVENT_CONNECT_DELAYED));
monitor.connect("inproc://monitor.socket");
socket.connect("tcp://127.0.0.1:6751");
event = Event.recv(monitor);
assertNotNull("No event was received", event);
assertEquals(ZMQ.EVENT_CONNECT_DELAYED, event.getEvent());