public static Context context(int ioThreads)
    {
        return new Context(ioThreads);
    }
@Test
    public void testSocketUnbind()
    {
        Context context = ZMQ.context(1);

        Socket push = context.socket(SocketType.PUSH);
        Socket pull = context.socket(SocketType.PULL);

        boolean rc = pull.setReceiveTimeOut(50);
        assertThat(rc, is(true));
        int port = push.bindToRandomPort("tcp://127.0.0.1");
        rc = pull.connect("tcp://127.0.0.1:" + port);
        assertThat(rc, is(true));

        System.out.println("Connecting socket to unbind on port " + port);
        byte[] data = "ABC".getBytes();

        rc = push.send(data);
        assertThat(rc, is(true));
        assertArrayEquals(data, pull.recv());

        rc = pull.unbind("tcp://127.0.0.1:" + port);
        assertThat(rc, is(true));

        rc = push.send(data);
        assertThat(rc, is(true));
        assertNull(pull.recv());

        push.close();
        pull.close();
        context.term();
    }