return;
Context context = ZMQ.context(1);
Event event;
Socket socket = context.socket(ZMQ.REP);
Socket monitor = context.socket(ZMQ.PAIR);
Socket helper = context.socket(ZMQ.REQ);
monitor.setReceiveTimeOut(100);
int port = socket.bindToRandomPort("tcp://127.0.0.1");
helper.connect("tcp://127.0.0.1:" + port);
assertTrue(socket.monitor("inproc://monitor.socket", ZMQ.EVENT_DISCONNECTED));
monitor.connect("inproc://monitor.socket");
byte[] req ="request".getBytes();
helper.send(req, 100);
assertArrayEquals(socket.recv(100), req);
helper.close();
event = Event.recv(monitor);
assertNotNull("No event was received", event);
assertEquals(ZMQ.EVENT_DISCONNECTED, event.getEvent());
socket.close();